43. Meeting time for multiple time zones

To work with time zones, you must use the tz.h header of the date library. However, this needs the IANA Time Zone Database to be downloaded and uncompressed on your machine.

This is how to prepare the time zone database for the date library:

  • Download the latest version of the database from https://www.iana.org/time-zones. Currently, the latest version is called tzdata2017c.tar.gz.
  • Uncompress this to any location on your machine, in a subdirectory called tzdata. Let's suppose the parent directory is c:\work\challenges\libs\date (on a Windows machine); this will have a sub directory called tzdata.
  • For Windows, you need to download a file called windowsZones.xml, containing mappings of Windows time zones ...

Get The Modern C++ Challenge now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.