I am developing some voice mail scripts for use under Linux.
One program schedules the delivery of voice messages.
To make this work properly across timezones I need to convert
a future (scheduled) time expressed in another zone into local time.
The only way I can see of doing this easily is to do something like:
LOCAL_SAVE=`date`
TZ=<remote zone> date -s <REMOTE_TIME>
LOCAL_TIME=`TZ=localtime date +FORMAT`
date -s <LOCAL_SAVE>
But this changes the system's time for an instant -- not at all nice.
My current method uses a fixed timzone offset calculated at the
current time. This of course will make scheduling inaccurate around
time discontinuities.
Is there any way to do what I want without having to hack some C code;
and if I have to write some C, what is the best way to go about it.
Thanks for your help,
Basser Department of Computer Science, F09 | PHONE : +61-2-692-4276 |
The University of Sydney NSW 2006 AUSTRALIA | FAX : +61-2-692-3838 |