Skip to content

Commit

Permalink
try again for globals
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Jun 15, 2024
1 parent eb9d21d commit fa512f0
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ namespace cctz {
namespace {

#if defined(_WIN32) || defined(_WIN64)
auto tm_gmtoff(const std::tm& tm) -> decltype(_timezone + _dstbias) {
// This is just a hack because s2 doesn't need this and it causes
// problems on Windows before UCRT.
// These are just hacks because s2 doesn't need this and it causes
// problems on Windows before UCRT.
long int tm_gmtoff(const std::tm& tm) {
return 0;
}
auto tm_zone(const std::tm& tm) -> decltype(_tzname[0]) {
const bool is_dst = tm.tm_isdst > 0;
return _tzname[is_dst];
const char* tm_zone(const std::tm& tm) {
return "UTC";
}
#elif defined(__sun) || defined(_AIX)
// Uses the globals: 'timezone', 'altzone' and 'tzname'.
Expand Down

0 comments on commit fa512f0

Please sign in to comment.