in reply to Localtime() or gmtime()

perhaps this is a bit makeshift, but have you considered altering the return from time() to add/deduct the correct number of hours and then apply localtime()?

i am not sure, but i think pacific and east euro are 10 hours apart, so that should be

localtime(time() - 10 * 60 * 60);

actually changing the time zone is very platform specific, and you probably want to ask your sysop instead of the people here.

Perhaps the Time::Local module (standard distribution) will also be of some use to you.

-nuffin zz zZ Z Z #!perl

Replies are listed 'Best First'.
Re: Localtime() or gmtime()
by Abigail-II (Bishop) on Oct 15, 2002 at 08:15 UTC
    Of course, it isn't as simple as that. The main problem is daylight savings time. The world doesn't switch at the same time - or does the Pacific coast switch to DST in the middle of the day? ;-) DST happens at different dates, different times, and with different differences in different timezones, and some zones don't switch at all.

    On Unix, you can often get the time in a different zone by setting the TZ environment variable properly.

    Abigail