mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
MDEV-22615 system_time_zone may be incorrectly reported as "unknown".
TIME_ZONE_ID_UNKNOWN return code from GetDynamicTimeZoneInformation() does not mean failure. It only means, daylight saving dates in the returned strct are not valid. TIME_ZONE_ID_INVALID means failure, in this case "unknown" should be returned
This commit is contained in:
parent
5e12aca57f
commit
4869e7f4a8
1 changed files with 1 additions and 1 deletions
|
@ -4176,7 +4176,7 @@ static void get_win_tzname(char* buf, size_t size)
|
|||
{0,0}
|
||||
};
|
||||
DYNAMIC_TIME_ZONE_INFORMATION tzinfo;
|
||||
if (GetDynamicTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_UNKNOWN)
|
||||
if (GetDynamicTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_INVALID)
|
||||
{
|
||||
strncpy(buf, "unknown", size);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue