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 /platform/android | |
parent | 27e132347324318567419ac5039d51338d7d4f0e (diff) |
Fixes #65377: get_datetime_* functions can return wrong values
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/export/export_plugin.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 0f8ef3f7d6..e5656bd00b 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -569,16 +569,15 @@ bool EditorExportPlatformAndroid::_should_compress_asset(const String &p_path, c } zip_fileinfo EditorExportPlatformAndroid::get_zip_fileinfo() { - OS::Time time = OS::get_singleton()->get_time(); - OS::Date date = OS::get_singleton()->get_date(); + OS::DateTime dt = OS::get_singleton()->get_datetime(); zip_fileinfo zipfi; - zipfi.tmz_date.tm_hour = time.hour; - zipfi.tmz_date.tm_mday = date.day; - zipfi.tmz_date.tm_min = time.minute; - zipfi.tmz_date.tm_mon = date.month - 1; // tm_mon is zero indexed - zipfi.tmz_date.tm_sec = time.second; - zipfi.tmz_date.tm_year = date.year; + zipfi.tmz_date.tm_year = dt.year; + zipfi.tmz_date.tm_mon = dt.month - 1; // tm_mon is zero indexed + zipfi.tmz_date.tm_mday = dt.day; + zipfi.tmz_date.tm_hour = dt.hour; + zipfi.tmz_date.tm_min = dt.minute; + zipfi.tmz_date.tm_sec = dt.second; zipfi.dosDate = 0; zipfi.external_fa = 0; zipfi.internal_fa = 0; |