PIFile: applyFileInfo
PIPeer: fixed pisd work progress ... git-svn-id: svn://db.shs.com.ru/pip@20 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -293,19 +293,35 @@ PIString PIDateTime::toString(const PIString & format) const {
|
||||
|
||||
|
||||
#ifdef WINDOWS
|
||||
PIDateTime::PIDateTime(FILETIME t) {
|
||||
FILETIME lt;
|
||||
FileTimeToLocalFileTime(&t, <);
|
||||
SYSTEMTIME st;
|
||||
FileTimeToSystemTime(<, &st);
|
||||
year = st.wYear;
|
||||
month = st.wMonth;
|
||||
day = st.wDay;
|
||||
hours = st.wHour;
|
||||
minutes = st.wMinute;
|
||||
seconds = st.wSecond;
|
||||
milliseconds = st.wMilliseconds;
|
||||
}
|
||||
PIDateTime::PIDateTime(FILETIME t) {
|
||||
FILETIME lt;
|
||||
SYSTEMTIME st;
|
||||
FileTimeToLocalFileTime(&t, <);
|
||||
FileTimeToSystemTime(<, &st);
|
||||
year = st.wYear;
|
||||
month = st.wMonth;
|
||||
day = st.wDay;
|
||||
hours = st.wHour;
|
||||
minutes = st.wMinute;
|
||||
seconds = st.wSecond;
|
||||
milliseconds = st.wMilliseconds;
|
||||
}
|
||||
|
||||
|
||||
FILETIME PIDateTime::toFILETIME() const {
|
||||
FILETIME lt, ret;
|
||||
SYSTEMTIME st;
|
||||
st.wYear = year;
|
||||
st.wMonth = month;
|
||||
st.wDay = day;
|
||||
st.wHour = hours;
|
||||
st.wMinute = minutes;
|
||||
st.wSecond = seconds;
|
||||
st.wMilliseconds = milliseconds;
|
||||
SystemTimeToFileTime(&st, <);
|
||||
LocalFileTimeToFileTime(<, &ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -224,6 +224,7 @@ struct PIP_EXPORT PIDateTime {
|
||||
PIDateTime(const PIDate & date, const PITime & time) {year = date.year; month = date.month; day = date.day; hours = time.hours; minutes = time.minutes; seconds = time.seconds; milliseconds = time.milliseconds;}
|
||||
#ifdef WINDOWS
|
||||
PIDateTime(FILETIME t);
|
||||
FILETIME toFILETIME() const;
|
||||
#endif
|
||||
int year;
|
||||
int month;
|
||||
|
||||
Reference in New Issue
Block a user