summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2021-10-29 15:49:22 +0200
committerGitHub <noreply@github.com>2021-10-29 15:49:22 +0200
commit82f88f5d563f3c3c89e2644986222a55c999f659 (patch)
tree338e723ce710027f8bc1131836a513024feb63d3 /platform
parentb71270e6eaed5f86f5b44a9238b86d9b6a606b76 (diff)
parent2dabdda36a511e5d1003205ceef1df0dfd401325 (diff)
Merge pull request #54340 from aaronfranke/time-doc
Update and fix Time documentation
Diffstat (limited to 'platform')
-rw-r--r--platform/uwp/os_uwp.cpp9
-rw-r--r--platform/uwp/os_uwp.h4
-rw-r--r--platform/windows/os_windows.cpp14
-rw-r--r--platform/windows/os_windows.h4
4 files changed, 17 insertions, 14 deletions
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index daf3c14f3b..1a84f5da38 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -441,12 +441,13 @@ String OS_UWP::get_name() const {
return "UWP";
}
-OS::Date OS_UWP::get_date(bool utc) const {
+OS::Date OS_UWP::get_date(bool p_utc) const {
SYSTEMTIME systemtime;
- if (utc)
+ if (utc) {
GetSystemTime(&systemtime);
- else
+ } else {
GetLocalTime(&systemtime);
+ }
Date date;
date.day = systemtime.wDay;
@@ -457,7 +458,7 @@ OS::Date OS_UWP::get_date(bool utc) const {
return date;
}
-OS::Time OS_UWP::get_time(bool utc) const {
+OS::Time OS_UWP::get_time(bool p_utc) const {
SYSTEMTIME systemtime;
if (utc)
GetSystemTime(&systemtime);
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index 9398573ee1..74a9e96b2c 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -185,8 +185,8 @@ public:
virtual String get_name() const;
- virtual Date get_date(bool utc) const;
- virtual Time get_time(bool utc) const;
+ virtual Date get_date(bool p_utc) const;
+ virtual Time get_time(bool p_utc) const;
virtual TimeZoneInfo get_time_zone_info() const;
virtual uint64_t get_unix_time() const;
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;
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index d24afa91eb..b8eca956c8 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -122,8 +122,8 @@ public:
virtual void initialize_joypads() override {}
- virtual Date get_date(bool utc) const override;
- virtual Time get_time(bool utc) const override;
+ virtual Date get_date(bool p_utc) const override;
+ virtual Time get_time(bool p_utc) const override;
virtual TimeZoneInfo get_time_zone_info() const override;
virtual double get_unix_time() const override;