summaryrefslogtreecommitdiffstats
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-10-28 10:16:47 -0500
committerAaron Franke <arnfranke@yahoo.com>2021-10-28 10:16:56 -0500
commit2dabdda36a511e5d1003205ceef1df0dfd401325 (patch)
tree702a4232a730dde9779ef834641d81951087b33b /platform/windows/os_windows.cpp
parentf7d852b5322104a90d45ef63c2ee54c937429487 (diff)
downloadredot-engine-2dabdda36a511e5d1003205ceef1df0dfd401325.tar.gz
Update Time documentation
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 6c02bf1e16..22c0219ea6 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -290,12 +290,13 @@ String OS_Windows::get_name() const {
return "Windows";
}
-OS::Date OS_Windows::get_date(bool utc) const {
+OS::Date OS_Windows::get_date(bool p_utc) const {
SYSTEMTIME systemtime;
- if (utc)
+ if (p_utc) {
GetSystemTime(&systemtime);
- else
+ } else {
GetLocalTime(&systemtime);
+ }
Date date;
date.day = systemtime.wDay;
@@ -306,12 +307,13 @@ OS::Date OS_Windows::get_date(bool utc) const {
return date;
}
-OS::Time OS_Windows::get_time(bool utc) const {
+OS::Time OS_Windows::get_time(bool p_utc) const {
SYSTEMTIME systemtime;
- if (utc)
+ if (p_utc) {
GetSystemTime(&systemtime);
- else
+ } else {
GetLocalTime(&systemtime);
+ }
Time time;
time.hour = systemtime.wHour;