diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-13 14:28:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 14:28:11 +0100 |
commit | bc9c1e899e62d8e02e0a5bc867cb6f408dbf60e0 (patch) | |
tree | 90cad1cc0750ce3c937f84dfef6d994800a2bf1c /platform/windows | |
parent | d2765cd04a507a1211a35a9690a482670a49f5fd (diff) | |
parent | 4d43aba31eb3545be4c6d952cd5115df2be52d27 (diff) |
Merge pull request #25842 from marcelofg55/windows_timezone
Fix get_time_zone_info returning inverted bias on Windows/UWP
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/os_windows.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 3de33da8f5..b8a6de1fd1 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2137,7 +2137,9 @@ OS::TimeZoneInfo OS_Windows::get_time_zone_info() const { ret.name = info.StandardName; } - ret.bias = info.Bias; + // Bias value returned by GetTimeZoneInformation is inverted of what we expect + // For example on GMT-3 GetTimeZoneInformation return a Bias of 180, so invert the value to get -180 + ret.bias = -info.Bias; return ret; } |