From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,2626bd3914d3be11 X-Google-Attributes: gidf8c9b,public X-Google-Thread: fc89c,2626bd3914d3be11 X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,2626bd3914d3be11 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-10-04 08:21:11 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!spool.mu.edu!darwin.sura.net!news.sesqui.net!uuneo.neosoft.com!Starbase.NeoSoft.COM!not-for-mail From: will@Starbase.NeoSoft.COM (Will Morse) Newsgroups: comp.unix.osf.osf1,comp.unix.questions,comp.unix.programmer Subject: Re: Timezone and Daylight Time Question Date: 4 Oct 1994 10:16:02 -0500 Organization: NeoSoft Internet Services +1 713 684 5969 Message-ID: <36rrji$14d@Starbase.NeoSoft.COM> References: <36q0d4$sao@news1.shell> NNTP-Posting-Host: starbase.neosoft.com Xref: bga.com comp.unix.osf.osf1:3859 comp.unix.questions:14293 comp.unix.programmer:7725 In article <36q0d4$sao@news1.shell>, Stephen Reagan wrote: >I need to get information regarding changes between daylight and standard >times, i.e., when the change occurs and whether it's a change to daylight >or standard time. I managed to find some meager information on reading the >file /etc/zoneinfo/timezone, which allegedly is produced by the zic utility. >However, I don't feel totally comfortable with this file, either in its >accuracy or whether there may be any "gotcha's" in trying to read from it. >(The info I had was the man page for tzfile, but I'm not convinced that this >information is complete or accurate). Is this file a reliable source for >timechange information? Are there any pitfalls to using/reading it? Does zic >really keep it up to date? (I was unable to test this due to constraints on >changing anything of this nature...). Does this system of timechange >information exist outside of DEC OSF/1? (my platform). Is this even the >actual source of timechange/timezone information as far as the system is >concerned? > >Sorry for all the questions, but I've been unable to find any reliable info >so far... > >--Steve The /etc/zoneinfo/timezone is about as accurate as it gets for the United States and for places that it gives specific answers. The problem is that the rules change from time to time in purely political ways. There is really no way a program can anticipate the Congress, or even local administration. There was a long thread on this somewhere recently, enough for a book in itself. There are half timezones in many places in the world (including my home in Newfoundland), there are differences in Europe. There are places (mostly in the middle east) that do not have daylight time. Like I say, a book. This basic system you describ exists throughout BSD based systems. It is very similar to System V based systems. Of course, we SPARC user's would say DEC's clock is ten years behind anyway :-) Unix system clocks are also prone to drift. If you are worried about exact times, you should look into a clock source. Hope this helps -- # Gravity, # Will Morse # not just a good idea, # BHP Petroleum (Americas) Inc. # it's the law. # Houston, Texas # # will@starbase.neosoft.com # # These are my views and do not necessarly reflect the views of BHP !