mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
gdate.c: Use standard name if no daylight saving exists
We should normally have a standard name for the time zone even if we don't have daylight saving in the time zone, so use the standard name also when GetTimeZoneInformation() returns TIME_ZONE_ID_UNKNOWN[1][2]. [1]: https://docs.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation [2]: https://docs.microsoft.com/zh-tw/windows/win32/api/timezoneapi/nf-timezoneapi-settimezoneinformation
This commit is contained in:
parent
fd79c8742b
commit
697d3112b0
@ -2556,9 +2556,7 @@ win32_strftime_helper (const GDate *d,
|
||||
break;
|
||||
case 'Z':
|
||||
n = GetTimeZoneInformation (&tzinfo);
|
||||
if (n == TIME_ZONE_ID_UNKNOWN)
|
||||
;
|
||||
else if (n == TIME_ZONE_ID_STANDARD)
|
||||
if (n == TIME_ZONE_ID_UNKNOWN || n == TIME_ZONE_ID_STANDARD)
|
||||
g_array_append_vals (result, tzinfo.StandardName, wcslen (tzinfo.StandardName));
|
||||
else if (n == TIME_ZONE_ID_DAYLIGHT)
|
||||
g_array_append_vals (result, tzinfo.DaylightName, wcslen (tzinfo.DaylightName));
|
||||
|
Loading…
Reference in New Issue
Block a user