aboutsummaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
authorest312015-06-07 15:06:13 +0200
committerest312015-06-07 15:36:14 +0200
commit64704ecbc50c20d58bc8270a4af63e310a72b69f (patch)
tree5916b22d261ca746efa8d6d855190fbd6f09a257 /platform/windows/os_windows.cpp
parent8d6181729381ff4b06b754f1c491666f70c77a6e (diff)
downloadgodot-64704ecbc50c20d58bc8270a4af63e310a72b69f.tar.gz
godot-64704ecbc50c20d58bc8270a4af63e310a72b69f.tar.zst
godot-64704ecbc50c20d58bc8270a4af63e310a72b69f.zip
Fix windows compilability
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index cdf9b007d..fea208282 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1829,13 +1829,14 @@ String OS_Windows::get_name() {
return "Windows";
}
-OS::Date OS_Windows::get_date() const {
+OS::Date OS_Windows::get_date(bool utc) const {
SYSTEMTIME systemtime;
- if (local)
+ if (utc)
GetSystemTime(&systemtime);
else
GetLocalTime(&systemtime);
+
Date date;
date.day=systemtime.wDay;
date.month=Month(systemtime.wMonth);
@@ -1858,20 +1859,6 @@ OS::Time OS_Windows::get_time(bool utc) const {
time.sec=systemtime.wSecond;
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 {
TIME_ZONE_INFORMATION info;
@@ -1889,7 +1876,7 @@ OS::TimeZoneInfo OS_Windows::get_time_zone_info() const {
return ret;
}
-uint64_t OS_Windows::get_unix_time(bool local) const {
+uint64_t OS_Windows::get_unix_time() const {
FILETIME ft;
SYSTEMTIME st;