diff options
author | est31 <MTest31@outlook.com> | 2015-06-07 15:06:13 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-06-07 15:36:14 +0200 |
commit | 64704ecbc50c20d58bc8270a4af63e310a72b69f (patch) | |
tree | 5916b22d261ca746efa8d6d855190fbd6f09a257 /platform/winrt | |
parent | 8d6181729381ff4b06b754f1c491666f70c77a6e (diff) |
Fix windows compilability
Diffstat (limited to 'platform/winrt')
-rw-r--r-- | platform/winrt/os_winrt.cpp | 15 | ||||
-rw-r--r-- | platform/winrt/os_winrt.h | 1 |
2 files changed, 9 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; diff --git a/platform/winrt/os_winrt.h b/platform/winrt/os_winrt.h index af44bd338e..b69feccae9 100644 --- a/platform/winrt/os_winrt.h +++ b/platform/winrt/os_winrt.h @@ -200,6 +200,7 @@ public: virtual Date get_date(bool utc) const; virtual Time get_time(bool utc) const; + virtual TimeZoneInfo get_time_zone_info() const; virtual uint64_t get_unix_time() const; virtual bool can_draw() const; |