|
@@ -1829,13 +1829,14 @@ String OS_Windows::get_name() {
|
|
return "Windows";
|
|
return "Windows";
|
|
}
|
|
}
|
|
|
|
|
|
-OS::Date OS_Windows::get_date() const {
|
|
|
|
|
|
+OS::Date OS_Windows::get_date(bool utc) const {
|
|
|
|
|
|
SYSTEMTIME systemtime;
|
|
SYSTEMTIME systemtime;
|
|
- if (local)
|
|
|
|
|
|
+ if (utc)
|
|
GetSystemTime(&systemtime);
|
|
GetSystemTime(&systemtime);
|
|
else
|
|
else
|
|
GetLocalTime(&systemtime);
|
|
GetLocalTime(&systemtime);
|
|
|
|
+
|
|
Date date;
|
|
Date date;
|
|
date.day=systemtime.wDay;
|
|
date.day=systemtime.wDay;
|
|
date.month=Month(systemtime.wMonth);
|
|
date.month=Month(systemtime.wMonth);
|
|
@@ -1858,20 +1859,6 @@ OS::Time OS_Windows::get_time(bool utc) const {
|
|
time.sec=systemtime.wSecond;
|
|
time.sec=systemtime.wSecond;
|
|
return time;
|
|
return time;
|
|
}
|
|
}
|
|
-OS::Time OS_Windows::get_time(bool utc) const {
|
|
|
|
-
|
|
|
|
- SYSTEMTIME systemtime;
|
|
|
|
- if (utc)
|
|
|
|
- GetSystemTime(&systemtime);
|
|
|
|
- else
|
|
|
|
- GetLocalTime(&systemtime);
|
|
|
|
-
|
|
|
|
- Time time;
|
|
|
|
- time.hour=systemtime.wHour;
|
|
|
|
- time.min=systemtime.wMinute;
|
|
|
|
- time.sec=systemtime.wSecond;
|
|
|
|
- return time;
|
|
|
|
-}
|
|
|
|
|
|
|
|
OS::TimeZoneInfo OS_Windows::get_time_zone_info() const {
|
|
OS::TimeZoneInfo OS_Windows::get_time_zone_info() const {
|
|
TIME_ZONE_INFORMATION info;
|
|
TIME_ZONE_INFORMATION info;
|
|
@@ -1889,7 +1876,7 @@ OS::TimeZoneInfo OS_Windows::get_time_zone_info() const {
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-uint64_t OS_Windows::get_unix_time(bool local) const {
|
|
|
|
|
|
+uint64_t OS_Windows::get_unix_time() const {
|
|
|
|
|
|
FILETIME ft;
|
|
FILETIME ft;
|
|
SYSTEMTIME st;
|
|
SYSTEMTIME st;
|