Open bambuk6 opened 4 years ago
It depends on the database, but generally yes. Linux typically installs the full IANA database which has rules dating back to the mid 1800's.
#include "date/tz.h"
#include <iostream>
int
main()
{
using namespace std;
using namespace std::chrono;
using namespace date;
auto time = sys_days{1834_y/February/27};
auto la = zoned_time{"America/Los_Angeles", time};
auto utc = zoned_time{"Etc/UTC", time};
cout << format("%T\n", la.get_local_time() - utc.get_local_time());
}
Output:
-07:52:58
For pre-std times, the IANA database typically uses "mean solar time" for the city named by the time zone.
How do I find the difference (say, in minutes) between some timezone and UTC in the past? Will the library respect the timezone rules that were active at that date in the past?