C++ Logo

STD-DISCUSSION

Advanced search

Subject: Can we use "UTC" timezone?
From: Akira Takahashi (faithandbrave_at_[hidden])
Date: 2020-01-06 01:28:10


Hi,
I have a question. Can we use "UTC" timezone?
The follow function specification uses "UTC" timezone.

N4830
27.11.6 Class template zoned_traits
[time.zone.zonedtraits]

static const time_zone* default_zone();
Returns: std::chrono::locate_zone("UTC").

However, I can't find "UTC" timezone name or link in timezone database.
https://github.com/eggert/tz

FYI, Howard Hinnant reference implementation specialize "UTC" timezone name.
https://github.com/HowardHinnant/date/blob/4c951652988b51c6adcf8e95646792a750994829/src/tz.cpp#L499

Is "UTC" timezone name is valid for chrono library?



STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups