Mail Archives: djgpp/2001/10/07/08:49:12
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 -