diff options
author | James <gotnospirit@gmail.com> | 2022-09-08 13:36:10 +0800 |
---|---|---|
committer | James <gotnospirit@gmail.com> | 2022-09-10 07:58:38 +0800 |
commit | 0aecfc92540618508568b5c7e8a050d36cf5322b (patch) | |
tree | ad7fe94efad6acb9deb5c160ba672cf37f9f8b0f /core/os/os.h | |
parent | 27e132347324318567419ac5039d51338d7d4f0e (diff) |
Fixes #65377: get_datetime_* functions can return wrong values
Diffstat (limited to 'core/os/os.h')
-rw-r--r-- | core/os/os.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/core/os/os.h b/core/os/os.h index 0e8a2d0398..363697ea30 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -202,18 +202,15 @@ public: MONTH_DECEMBER, }; - struct Date { + struct DateTime { int64_t year; Month month; uint8_t day; Weekday weekday; - bool dst; - }; - - struct Time { uint8_t hour; uint8_t minute; uint8_t second; + bool dst; }; struct TimeZoneInfo { @@ -221,8 +218,7 @@ public: String name; }; - virtual Date get_date(bool p_utc = false) const = 0; - virtual Time get_time(bool p_utc = false) const = 0; + virtual DateTime get_datetime(bool utc = false) const = 0; virtual TimeZoneInfo get_time_zone_info() const = 0; virtual double get_unix_time() const; |