* Avoids the need to download the IANA database.
* Heavily based on contributions by Aaron Bishop.
* Turn on with -DUSE_OS_TZDB, off by default.
* Not supported on Windows.
* Disables HAS_REMOTE_API.
* get_tzdb().version only supported on Apple. This string has
the value "unknown" elsewhere.
* Leap second support is missing on Apple, and may not be on your
platform either (please report). Leap second support is enabled,
disabled with -DMISSING_LEAP_SECONDS.
Without leap second support, utc_time, tai_time, and gps_time (and
those clocks) are not available.
* On Apple, time zone transitions are only supported in the range:
1901-12-13 20:45:52 to 2038-01-19 03:14:07
* On Linux, time zone transitions are only as far in the future as
the OS-provided transitions go. There is no support for POSIX-
style transitions.
- added date:: namespace to flloor() and abs() calls
- added IUnknown forward declaration before including Windows headers to prevent issue with objbase.h
- minor changes
get_download_gz_file() is not used when HAS_REMOTE_API=0, and causes:
warning: 'std::__cxx11::string date::get_download_gz_file(const string&)' defined but not used [-Wunused-function]
Wrap get_download_gz_file() inside #ifdef to remove the warning.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
* Use GetDynamicTimeZoneInformation to get .TimeZoneKeyName
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724318(v=vs.85).aspx
> Retrieves the current time zone and dynamic daylight saving time settings.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724253(v=vs.85).aspx
> The name of the time zone registry key on the local computer.
* This avoids the need to map from StandardName to TimeZoneKeyName.
* Using .DynamicDaylightTimeDisabled = true forces the OS to return a
non-daylight saving time result.
* Use of wcstombs is preferred over wstring_convert as the latter is now
deprecated in C++17 because the implementors could not interpret the
specification.
* For format, all a type must do is implement to_stream.
* For parse, each type X must specialize parse_manip<X,CharT,Traits>.
Each specialization must include a public typedef to itself named
type.
* Each parse_manip specialization must have a stream extraction
operator.
* This commit depends on expression-SFINAE. If this commit breaks
your build, it is likely that your compiler/version does not
support expression-SFINAE. To fix this NO_EXPRESSION_SFINAE
needs to be defined in the configuration area of date.h for
that compiler/version.