Article View: comp.std.c
Article #2197timezone info left out of time.h?
From: Paul D. Smith
Date: Thu, 01 Oct 1992 23:32
Date: Thu, 01 Oct 1992 23:32
24 lines
1760 bytes
1760 bytes
From the Rationale and examining the available functions the standard
allows an implementation to either be aware of timezone info or not
(by setting tm_isdst to a negative value and returning NULL from
gmtime()).
Given that, does anyone have any opinions on why some method of
determining the local timezone displacement from UTC was not included
in the standard? It could easily be made to return some invalid value
in the event timezone info is not available, just as gmtime() etc.
Without such functionality as far as I can see it is impossible to
determine the timezone offset in a standard way. This also means that
given a struct tm filled with UTC time you cannot standardly (new
word :) convert it into a time_t.
--
paul
-----
------------------------------------------------------------------
| Paul D. Smith | paul_smith@dg.com |
| Data General Corp. | pds@lemming.webo.dg.com |
| Network Systems Development Division | |
| Open Network Systems Development | "Pretty Damn S..." |
------------------------------------------------------------------
Technical Details
Message-ID:
<PDS.92Oct1193222@lemming.webo.dg.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!portal!lll-winken!sun-barr!olivea!sgigate!sgiblab!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!rpi!newsserver.pixel.kodak.com!psinntp!psinntp!dg-rtp!webo!dg-webo!pdsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!portal!lll-winken!sun-barr!olivea!sgigate!sgiblab!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!rpi!newsserver.pixel.kodak.com!psinntp!psinntp!dg-rtp!webo!dg-webo!pds From: pds@lemming.webo.dg.com (Paul D. Smith) Newsgroups: comp.std.c Subject: timezone info left out of time.h? Message-ID: <PDS.92Oct1193222@lemming.webo.dg.com> Date: 1 Oct 92 23:32:22 GMT Sender: usenet@webo.dg.com (Usenet Administration) Organization: NSDD/ONSD, Data General Corp., Westboro, MA Lines: 24