Rev 81507 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
localtime.c is a stripped-down version of that from tzcode (fromhttp://www.iana.org/time-zones), converted to use a 64-bit time_t andtm_zone/tm_offset on all platforms. Apart from removing unused codeand merging in the parts of private.h which are needed, the other mainchanges are- to use environment variable TZDIR to point to the zoneinfo files, andfailing that, R_HOME/share/zoneinfo.- to call getTZinfo() to get the default timezone if TZ is unset.- to use an R_ prefix on exported entry points.strftime.c is a stripped-down version of that from tzcode, using thesystem version for locale-dependent day/month/am/pm names.zoneinfo.zip is formed by installing tzdata on a system with zic, andzipping up the results, after adding a file VERSION giving theversion. (The binary databases are byte streams, and so do not dependon the architecture. There are some comments about whether time_t issigned, which it is on all sensible platforms. This is only used withR's implemntation (by default), where time_t is int_fast64_t, hence signed.)To remake it, download the current version of tzdataXXXXx.tar.gz fromhttps://www.iana.org/time-zones to this directory and runmake -f Make.zi VERSION=2022gfor the appropriate version. If zic is not on the path, use something likemake -f Make.zi VERSION=2022g ZIC=/usr/sbin/zicNB: it seems that this needs to be done on a system with 64-bit time_tor the catalogs will be confined to 1902-2038. (Even that did notsuffice on earlier versions of macOS.) As a sanity check, the size ofzoneinfo.zip should be about 410KB if 64-bit: a 32-bit version will beabout 280KB. In 2021 it was possible to use macOS, whose zic gavemany warnings and created a ca 475KB file.Note that we include 'backward': vendor versions might not, or mightuse 'backzone'.