mirror of
https://github.com/godotengine/godot
synced 2024-09-16 02:27:37 +00:00
Fix get_time_zone_info returning inverted bias on Windows/UWP
This commit is contained in:
parent
5aff990354
commit
4d43aba31e
|
@ -579,7 +579,9 @@ OS::TimeZoneInfo OSUWP::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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue