Hi,
I want to write the following C function under Unix :
This function has to convert a date according to a specific timezone.
The parameters have to be :
- A date ( Format : YYYYMMDDHHMISS ) given in a specific time zone.
- A timezone ( Ex : PSD8PDT) which has to be used to convert the date.
For example :
If the date in input is "20010417180010" ( given in PSD8PDT) and the
timezone which has to be used is UCT-5:30, the new date has to be converted
according to UCT-5:30.
I looked at different UNIX functions like ctime, localtime ... and thought
about modifying the TZ variable. But my problem is to handle the daylight
saving times.
For example, "20010117180010" was the local date and time in the USA in
january. It means that the daylight savings time wasn't in effect. How to
convert this date now (when the daylight savings time is in effect in the
USA) according to the UCT-5:30 timezone where the daylight savings time may
not exist ? I mean it isn't really usefull to modify the TZ variable in this
case.
Does anyone know a function or has a clue about this problem ?
Thanks.
Sylvain BENOIST
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
--
Posted from [63.145.241.30] by way of f82.law14.hotmail.com [64.4.21.82]
via Mailgate.ORG Server - http://www.Mailgate.ORG