The R Project SVN R

Rev

Rev 89955 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
83189 ripley 1
localtime.c is a stripped-down version of that from tzcode (from
89142 ripley 2
http://www.iana.org/time-zones in 2007), converted to use a 64-bit
3
time_t and tm_zone/tm_offset on all platforms.  Apart from removing
4
unused code and merging in the parts of private.h which are needed,
5
the other main changes are
43814 ripley 6
 
7
- to use environment variable TZDIR to point to the zoneinfo files, and
8
  failing that, R_HOME/share/zoneinfo.
9
 
10
- to call getTZinfo() to get the default timezone if TZ is unset.
11
 
83189 ripley 12
- to use an R_ prefix on exported entry points.
13
 
64580 ripley 14
strftime.c is a stripped-down version of that from tzcode, using the
15
system version for locale-dependent day/month/am/pm names.
43814 ripley 16
 
64580 ripley 17
 
68517 ripley 18
zoneinfo.zip is formed by installing tzdata on a system with zic, and
64541 ripley 19
zipping up the results, after adding a file VERSION giving the
68517 ripley 20
version.  (The binary databases are byte streams, and so do not depend
21
on the architecture.  There are some comments about whether time_t is
68525 ripley 22
signed, which it is on all sensible platforms.  This is only used with
80960 ripley 23
R's implemntation (by default), where time_t is int_fast64_t, hence signed.)
43815 ripley 24
 
64543 ripley 25
To remake it, download the current version of tzdataXXXXx.tar.gz from
75854 ripley 26
https://www.iana.org/time-zones to this directory and run
43815 ripley 27
 
90218 ripley 28
make -f Make.zi VERSION=2026c
43815 ripley 29
 
64543 ripley 30
for the appropriate version.  If zic is not on the path, use something like
31
 
90218 ripley 32
make -f Make.zi VERSION=2026c ZIC=/usr/sbin/zic
64543 ripley 33
 
80963 ripley 34
Note that we include 'backward': vendor versions might not, or might
35
use 'backzone'.