delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/07/08:49:12

From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Calculating Time Zones
Date: Sun, 07 Oct 2001 14:39:44 +0200
Lines: 25
Message-ID: <3BC04D10.7DF67D8B@is.elta.co.il>
References: <ioe0stkcg3k8cijqgqcop5qrf3km8l0hu7 AT 4ax DOT com>
NNTP-Posting-Host: 192.116.55.139
Mime-Version: 1.0
X-Trace: fu-berlin.de 1002458362 20835087 192.116.55.139 (16 [61365])
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Radical, NetSurfer wrote:
> 
> Using DJGPP 2.03/GCC 2.95.3, I want to create a
> program that does nothing more than report what
> 
> 1) my local time is
> 
> 2) and the local times of friends living around the world
> 
> 3) calculating the difference between time zones
> 
> 4) setting alarms for each unique time zone, etc.
> 
> Obtaining local time should be easy enough...
> 
> How difficult will it be to add and subtract several hours
> from my local time, in order to get accurate obtain times
> elsewhere in the world...

You should already have everything you need in the library, provided that
you install djtzn203.zip (see section 22.20 of the DJGPP FAQ for more
details about djtzn203.zip files).  In particular, setting the TZ
environment variable to that of the other places will return information as
if you magically moved to that timezone.  (You can set TZ from a running
program with the setenv or putenv library functions.)

- Raw text -


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