Xref: utzoo comp.databases:9532 comp.software-eng:5339 comp.infosystems:225 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ncar!unmvax!uokmax!d.cs.okstate.edu!drd!mark From: mark@drd.com (Mark Lawrence) Newsgroups: comp.databases,comp.software-eng,comp.infosystems Subject: Re: Time Zones HELP! Message-ID: <1991Apr9.132029.8367@drd.com> Date: 9 Apr 91 13:20:29 GMT References: <1991Apr5.234855.14441@odin.corp.sgi.com> <1991Apr6.021724.6578@sctc.com> <1991Apr6.182727.16147@ingres.Ingres.COM> Organization: DRD Corporation Lines: 34 In article <1991Apr6.182727.16147@ingres.Ingres.COM> jas@Ingres.COM (Jim Shankland) writes: >Think of time zone information as a display format for an absolute >time, somewhat analogous to a floating point display format. The >database itself must store absolute time (in practice, Greenwich Mean >Time), while the client chooses a display format (i.e., timezone) >in which to display that time, probably on a per-session basis. >(Unless you really believe that noon in San Francisco comes before >1 p.m. in New York -- which would be a curious model of time.) Excellent suggestion. >Arthur David Olson of NIH (I think) has written a timezone library in >C that does as much of this stuff as possible. It includes tables >encoding the whims of dozens of state and national legislatures. >You should be able to pick this up from your comp.sources.unix >archives, or FTP it from somewhere. Ask around. I'm using it now (in fact) to retrofit better handling of time/date into our application. Mike Wescott at NCR (thanks Mike!) gave me the pointer I needed to find it. He wrote: > Look at getdate(3) which comes as a part of the News sources. It does > the picking and the conversion to standard unix format. > > Also look at the routines that came as part of the v18i111-7 posting in > comp.sources.unix: "Table-driven ctime/time/localtime/date package" > for ideas. There is a struct tm to time_t conversion routine in there, > using a binary search to do the conversion. found mine at uunet v18 archives. You can find yours at finer anon ftp sites everywhere. -- mark@drd.com mark@jnoc.go.jp