HowardHinnant / date

A date and time library based on the C++11/14/17 <chrono> header
Other
3.08k stars 669 forks source link

output when loading new timezone db 2022b #746

Open grumpyquant opened 1 year ago

grumpyquant commented 1 year ago

Hi,

Compiling the library with this cmake command:

cmake -DCMAKE_INSTALL_PREFIX=output_location -DCMAKE_BUILD_TYPE=Release -DBUILD_TZ_LIB=ON -DMANUAL_TZ_DB=ON .. and then running this small example:

#include <date/date.h>
#include <date/tz.h>

int main()
{
    date::set_install("location_of_tz_db");
    date::reload_tzdb();
}

results in this output when pointing to the latest iana timezone database 2022b:

                #STDOFF 2:05:08.9
                #STDOFF 8:05:43.2
                #STDOFF 7:36:41.7
                #STDOFF -0:25:21.1
                #STDOFF 1:39:49.2
                #STDOFF -0:36:44.68
                #STDOFF -4:56:01.6
                #STDOFF -3:58:29.2
                #STDOFF -4:19:18.3
                #STDOFF -5:36:13.3
                #STDOFF -4:56:16.4
                #STDOFF 2:05:08.9
                #STDOFF 8:05:43.2
                #STDOFF 7:36:41.7
                #STDOFF -0:25:21.1
                #STDOFF 1:39:49.2
                #STDOFF -0:36:44.68
                #STDOFF -4:56:01.6
                #STDOFF -3:58:29.2
                #STDOFF -4:19:18.3
                #STDOFF -5:36:13.3
                #STDOFF -4:56:16.4

The database in question can be found here:

I'm not much of an expert in this area so not sure what this means...

Thanks.

grumpyquant commented 1 year ago

sorry the link must have been dropped. Here's the db:

https://data.iana.org/time-zones/releases/tzdata2022b.tar.gz

HowardHinnant commented 1 year ago

Thanks. Fixed on master with this commit: https://github.com/HowardHinnant/date/commit/22ceabf205d8d678710a43154da5a06b701c5830

HunterZ commented 1 year ago

Is there any possibility of producing a versioned release with this fix? Vcpkg apparently only package versioned releases, so they currently ship 3.0.1 which is now quite out of date (no pun intended).

jeremy-rifkin commented 3 weeks ago

Hi, friendly bump :) Would it be possible to at least get a patch release? The last release was 3 years ago and this has been solved for 2 years.