forked from HowardHinnant/date
Tweak getTimeZoneKeyName():
* for systems that return "Coordinated Universal Time". * return "UTC" instead.
This commit is contained in:
4
tz.cpp
4
tz.cpp
@@ -2884,7 +2884,9 @@ getTimeZoneKeyName()
|
|||||||
char buf[128] = {};
|
char buf[128] = {};
|
||||||
assert(sizeof(buf) >= wlen+1);
|
assert(sizeof(buf) >= wlen+1);
|
||||||
wcstombs(buf, dtzi.TimeZoneKeyName, wlen);
|
wcstombs(buf, dtzi.TimeZoneKeyName, wlen);
|
||||||
return std::string(buf);
|
if (strcmp(buf, "Coordinated Universal Time") == 0)
|
||||||
|
return "UTC";
|
||||||
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
const time_zone*
|
const time_zone*
|
||||||
|
Reference in New Issue
Block a user