I need an easier way to convert time to different time zones. I'm using the local time function and I'm in the pacific time zone. I need all of my times to by in the Eastern (et) time zone. I have no problem converting my local hour times to et time but for the days I'd rather have an easier way. The hour conversions were hard enough in my situation.

In know that you can get the time function to use gmt time, can you get it to do eastern (et) time?

Have you tried changing the timezone environment variable before using localtime() ? Or simply use localtime(time() - 3 * 3600) - or whatever the time difference is between your server time and Eastern time.

Ok, That works but it's only 3:12 pm here, I'm using the hours from the time function so it 15 hours military time. That's the way it prints the time for the hours when I do this.

(@time) = localtime(time); print "It is $time[2]";

It Is "15"

When I use your code it prints "18" instead of "15". That's right.

But when it's 10:00 pm here and 1:00 am on the east coast. That's 22 and 1 in military time. Will the perl recognize that it's 1 when it adds three to the time of 22 or will it just add three to equal 25.