summaryrefslogtreecommitdiff
path: root/platform/winrt
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-06-07 10:40:04 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-06-07 10:40:04 -0300
commita30b2bf5df55eafee72b51951b8947f6a06d8d02 (patch)
tree5916b22d261ca746efa8d6d855190fbd6f09a257 /platform/winrt
parent8d6181729381ff4b06b754f1c491666f70c77a6e (diff)
parent64704ecbc50c20d58bc8270a4af63e310a72b69f (diff)
Merge pull request #2042 from est31/fix-win
Fix windows compilability
Diffstat (limited to 'platform/winrt')
-rw-r--r--platform/winrt/os_winrt.cpp15
-rw-r--r--platform/winrt/os_winrt.h1
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;