summaryrefslogtreecommitdiff
path: root/platform/winrt/os_winrt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/winrt/os_winrt.cpp')
-rw-r--r--platform/winrt/os_winrt.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp
index 24037f05d7..ab5953f980 100644
--- a/platform/winrt/os_winrt.cpp
+++ b/platform/winrt/os_winrt.cpp
@@ -442,10 +442,14 @@ String OSWinrt::get_name() {
return "WinRT";
}
-OS::Date OSWinrt::get_date() const {
+OS::Date OSWinrt::get_date(bool utc) const {
SYSTEMTIME systemtime;
- GetLocalTime(&systemtime);
+ if (utc)
+ GetSystemTime(&systemtime);
+ else
+ GetLocalTime(&systemtime);
+
Date date;
date.day=systemtime.wDay;
date.month=Month(systemtime.wMonth);
@@ -485,14 +489,11 @@ OS::TimeZoneInfo OS_Windows::get_time_zone_info() const {
return ret;
}
-uint64_t OSWinrt::get_unix_time(bool utc) const {
+uint64_t OSWinrt::get_unix_time() const {
FILETIME ft;
SYSTEMTIME st;
- if (utc)
- GetSystemTime(&systemtime);
- else
- GetLocalTime(&systemtime);
+ GetSystemTime(&systemtime);
SystemTimeToFileTime(&st, &ft);
SYSTEMTIME ep;