git-svn-id: svn://db.shs.com.ru/pip@314 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -310,6 +310,17 @@ PIString PIDateTime::toString(const PIString & format) const {
|
||||
|
||||
|
||||
#ifdef WINDOWS
|
||||
PIDateTime::PIDateTime(SYSTEMTIME t) {
|
||||
year = t.wYear;
|
||||
month = t.wMonth;
|
||||
day = t.wDay;
|
||||
hours = t.wHour;
|
||||
minutes = t.wMinute;
|
||||
seconds = t.wSecond;
|
||||
milliseconds = t.wMilliseconds;
|
||||
}
|
||||
|
||||
|
||||
PIDateTime::PIDateTime(FILETIME t) {
|
||||
FILETIME lt;
|
||||
SYSTEMTIME st;
|
||||
@@ -325,8 +336,7 @@ PIDateTime::PIDateTime(FILETIME t) {
|
||||
}
|
||||
|
||||
|
||||
FILETIME PIDateTime::toFILETIME() const {
|
||||
FILETIME lt, ret;
|
||||
SYSTEMTIME PIDateTime::toSYSTEMTIME() const {
|
||||
SYSTEMTIME st;
|
||||
st.wYear = year;
|
||||
st.wMonth = month;
|
||||
@@ -335,6 +345,13 @@ FILETIME PIDateTime::toFILETIME() const {
|
||||
st.wMinute = minutes;
|
||||
st.wSecond = seconds;
|
||||
st.wMilliseconds = milliseconds;
|
||||
return st;
|
||||
}
|
||||
|
||||
|
||||
FILETIME PIDateTime::toFILETIME() const {
|
||||
FILETIME lt, ret;
|
||||
SYSTEMTIME st = toSYSTEMTIME();
|
||||
SystemTimeToFileTime(&st, <);
|
||||
LocalFileTimeToFileTime(<, &ret);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user