There is an environmental variable that you can set - TZ - timezone. Definitions for the various timezones are located in /usr/share/zoneinfo - just browse this directory to find the correct name to set TZ to, it will be the file's name. If the correct file is in a directory under /usr/share/zoneinfo, then use this format - directory/filename, see the test script below for clarification.
Try this as a test and see if it reports the correct time for Taiwan -
Code Sample:
#!/usr/bin/perl
$ENV{TZ} = 'Asia/Taipei';
print scalar localtime, "\n";
print scalar gmtime, "\n";
|
|
Just set TZ in your script and it should work.
[This message has been edited by mike_w (edited 04-25-00@4:43 pm)]