In the "tzfile" section, you refer to the IANA tz database time zones - as a rule, computer time zones are set these days. For example, America/Los_Angeles or Europe/London .
These time zones are much richer than possible with the POSIX time zones - because they contain the history of time in this place. POSIX timelines can only store current time zone rules, so they cannot accurately represent time in the real world, where time zone rules often change.
See also the section on POSIX time zones in the time zone wiki .
However, if you should use POSIX time zones, you can look at the date_time module in Boost . Boost has its own IANA time zone data file . This is described in the "Time Zone Database" section of the documents . After loading the zone, you can use to_posix_string to get the value you are looking for.
For instance:
tz_database tz_db; tz_db.load_from_file("./date_time_zonespec.csv"); time_zone_ptr nyc = tz_db.time_zone_from_region("America/New_York"); nyc->to_posix_string();
Keep in mind that the IANA time zone database is updated about a dozen or so once a year, and it seems that Boost has not updated its csv file since April 2011. I'm not sure what their process is for saving the file - but I would have guessed that it was broken.
source share