Commit 4869e7f4 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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
parent 5e12aca5
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment