delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/29/12:53:27

To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: New time routines
Date: Mon, 29 Aug 94 17:16:57 +0200
From: eliz AT is DOT elta DOT co DOT il

I looked into the new time routines in 3rd beta of 1.12maint1.
Everything seems ok except 2 minor points:

	1. The _tzset_maybe() routine called by stat() and
gettimeofday() is unnecessary.  I suppose it was added to get
the values of dst flag and the offset from GMT without the overhead
of full-blown tzset().  But mktime() automatically determines these
and uses them internally if it is called with a *negative*
tm_isdst.  mktime() then returns the correct settings of dst flag
and gmt offset in the appropriate fields of tm structure.
This is documented on ctime(3) man page, and the version we use does
this right.  I recommend adding the ctime(3) man page to the docs,
just like those for zfile(8) and zic(8) which are in the maint release.

	2. The #if 0 clause inside ctime.c which disabled tzsetwall()
in case TZ is not defined, should be re-enabled.  Otherwise, the
program would behave like TZ=EST5 instead of GMT0.

I wrote:
>                      Anybody out there knows where I could get the
> source for zic?

That, of course, was written *before* I saw the maint release.  zic(8)
is there, complete with its source code and man page.  Thanks, DJ.

	Eli Zaretskii

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019