Does anyone have a UNIX function for converting a time from timezoneX to timezoneY? I know how to write this by mucking with char** environ and by calling tzset(), but I'm interested in a more elegant solution (perhaps using fields in the tm structure).
convert(timezoneX, timezoneY, inputTime, outputTime)
The char** environ solution seems to me to be inelegant because
1) I have to reread a file whenever I call tzset() (I think), and
2) while I'm doing the conversion the call to tzset() has a global effect on my process. If I'm interrupted by a signal handler that displays the time it will be in a foreign timezone.
My current best solution is to use the Rogue Wave Tools.h++ library class RWZone. Nathan Myers myersn@roguewave.com