summaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 4bf4fea845..16b9e9b327 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1832,7 +1832,10 @@ String OS_Windows::get_name() {
OS::Date OS_Windows::get_date() const {
SYSTEMTIME systemtime;
- GetLocalTime(&systemtime);
+ if (local)
+ GetSystemTime(&systemtime);
+ else
+ GetLocalTime(&systemtime);
Date date;
date.day=systemtime.wDay;
date.month=Month(systemtime.wMonth);
@@ -1841,10 +1844,13 @@ OS::Date OS_Windows::get_date() const {
date.dst=false;
return date;
}
-OS::Time OS_Windows::get_time() const {
+OS::Time OS_Windows::get_time(bool utc) const {
SYSTEMTIME systemtime;
- GetLocalTime(&systemtime);
+ if (utc)
+ GetSystemTime(&systemtime);
+ else
+ GetLocalTime(&systemtime);
Time time;
time.hour=systemtime.wHour;
@@ -1853,7 +1859,7 @@ OS::Time OS_Windows::get_time() const {
return time;
}
-uint64_t OS_Windows::get_unix_time() const {
+uint64_t OS_Windows::get_unix_time(bool local) const {
FILETIME ft;
SYSTEMTIME st;