diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2021-10-29 15:49:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 15:49:22 +0200 |
commit | 82f88f5d563f3c3c89e2644986222a55c999f659 (patch) | |
tree | 338e723ce710027f8bc1131836a513024feb63d3 /drivers/unix/os_unix.cpp | |
parent | b71270e6eaed5f86f5b44a9238b86d9b6a606b76 (diff) | |
parent | 2dabdda36a511e5d1003205ceef1df0dfd401325 (diff) |
Merge pull request #54340 from aaronfranke/time-doc
Update and fix Time documentation
Diffstat (limited to 'drivers/unix/os_unix.cpp')
-rw-r--r-- | drivers/unix/os_unix.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 193825a73f..1bc88a86f7 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -160,10 +160,10 @@ double OS_Unix::get_unix_time() const { return (double)tv_now.tv_sec + double(tv_now.tv_usec) / 1000000; }; -OS::Date OS_Unix::get_date(bool utc) const { +OS::Date OS_Unix::get_date(bool p_utc) const { time_t t = time(nullptr); struct tm lt; - if (utc) { + if (p_utc) { gmtime_r(&t, <); } else { localtime_r(&t, <); @@ -181,10 +181,10 @@ OS::Date OS_Unix::get_date(bool utc) const { return ret; } -OS::Time OS_Unix::get_time(bool utc) const { +OS::Time OS_Unix::get_time(bool p_utc) const { time_t t = time(nullptr); struct tm lt; - if (utc) { + if (p_utc) { gmtime_r(&t, <); } else { localtime_r(&t, <); |