git-svn-id: svn://db.shs.com.ru/pip@314 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-02-28 15:23:30 +00:00
parent be4df6903c
commit 749a7f2f48
2 changed files with 21 additions and 2 deletions

View File

@@ -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, &lt);
LocalFileTimeToFileTime(&lt, &ret);
return ret;