delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/05/04:45:31

Date: Fri, 5 Dec 1997 17:41:05 +0800 (PST)
From: Orlando Andico <orly AT dilnet DOT upd DOT edu DOT ph>
To: Michael Bukin <M DOT A DOT Bukin AT inp DOT nsk DOT su>
cc: djgpp AT delorie DOT com
Subject: Re: zoneinfo
In-Reply-To: <20oh2w42n3.fsf@Sky.inp.nsk.su>
Message-ID: <Pine.LNX.3.95.971205173527.10614A-100000@jewel.eee.upd.edu.ph>
MIME-Version: 1.0

On 5 Dec 1997, Michael Bukin wrote:

> ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) writes:
> 
> > BTW what functions or objects use zoneinfo?
..

I guess I should answer this to put an end to the questioning  :)
Zoneinfo is used for setting the localtime (time zone information). It's
standard with UNIX System V so DJGPP has it too. The Zoneinfo time gives
things like time zone, minutes west of DST, and so forth.

This is because most UNIX machines have their clocks set to UTC or
Greenwich Mean Time, and the time functions (gettimeofday(),
settimeofday(), localtime(), and so forth) convert from UTC to local time
using the zoneinfo information.

However: you can safely zap all the zoneinfo files, and the time functions
will not convert from UTC to local time (they will assume that you are in
timezone GMT+0 or GMT). But that's not a major problem because most PCs'
CMOS clocks are set to localtime anyway and not UTC (is YOUR machine's
CMOS clock set to UTC?)

You'll only run into trouble if you do something like write a Network Time
Protocol client using DJGPP. The NTP servers always return a time in UTC,
so you need to know your time zone to convert to local time for your own
use. If you don't do anything like that, though (DOS games and apps in
general aren't very picky about time internationalization) then you can
get by without zoneinfo.


- Raw text -


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