[tz] Java & Rearguard
Ian Abbott
abbotti at mev.co.uk
Thu Jun 6 09:51:46 UTC 2019
On 06/06/2019 03:33, Steve Summit wrote:
> Stephen Colebourne wrote:
> (As an aside: Is it my imagination, or was there a time when C
> had an array of 1, 2, or maybe more than 2 time zone strings,
> and you used tm_isdst as an index into them, such that tm_isdst
> functioned as a sort of an opaque token even though it had "dst"
> in its name?)
It's not your imagination. It still exists in the POSIX specs as the
tzname array, but it is either 2 elements long or unspecified length,
depending where you look:
(1) http://pubs.opengroup.org/onlinepubs/9699919799/functions/tzname.html
extern char *tzname[2];
The tzset() function shall set the external variable tzname as follows:
tzname[0] = "std";
tzname[1] = "dst";
where std and dst are as described in XBD Environment Variables.
(2) http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
extern char *tzname[];
The value of tm_isdst shall be positive if Daylight Savings Time is in
effect, 0 if Daylight Savings Time is not in effect, and negative if the
information is not available.
(From the above, it seems to me that tzname[0] applies when tm_isdst==0,
and tzname[1] applies when tm_isdst>0.)
--
-=( Ian Abbott <abbotti at mev.co.uk> || Web: www.mev.co.uk )=-
-=( MEV Ltd. is a company registered in England & Wales. )=-
-=( Registered number: 02862268. Registered address: )=-
-=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-
More information about the tz
mailing list