Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ut-sally.UUCP Path: utzoo!decvax!bellcore!ulysses!mhuxr!mhuxt!mhuxv!akgua!akguc!codas!peora!pesnta!pyramid!ut-sally!std-unix From: std-unix@ut-sally.UUCP (Moderator, John Quarterman) Newsgroups: mod.std.unix Subject: Re: localtime(), ctime() and timezones Message-ID: <4381@ut-sally.UUCP> Date: Fri, 7-Mar-86 11:30:16 EST Article-I.D.: ut-sally.4381 Posted: Fri Mar 7 11:30:16 1986 Date-Received: Sat, 8-Mar-86 12:55:20 EST References: <4347@ut-sally.UUCP> Organization: IEEE/P1003 Portable Operating System Environment Committee Lines: 34 Approved: jsq@sally.UUCP Date: 6 Mar 86 23:09:30 EST (Thu) From: floyd!opus!ka@SEISMO.CSS.GOV (Kenneth Almquist) Organization: Bell Labs, Holmdel, NJ I basicly agree with Robert Elz. A few comments: 1) I suggest adding an entry for the timezone name to the tm structure. Something like char tm_zone[6]; I expect that time zone names will not exceed 5 characters, although the size of this array need not be specified in the standard. I don't suggest making tm_zone a character pointer because if that were done any implementation would be complicated by the need to ensure that tm_zone was still valid after settz was called with a different time zone. 2) The routine name is gmtime, not gmttime. 3) Removing the explicit mention of a time zone directory from the standard means that there is no longer a way to find the offset of time zone that a time zone name represents. How about providing a routine to do this: long tzoffset(tzname) char *tzname; which takes a time zone name and returns the offset of that time zone in seconds with respect to GMT? Kenneth Almquist ihnp4!houxm!hropus!ka (official name) ihnp4!opus!ka (shorter path) Volume-Number: Volume 5, Number 67