Gossamer Forum
Home : General : Perl Programming :

Changeing the Date and Time in perl

Quote Reply
Changeing the Date and Time in perl
How can I change the date in time from the date/time on my server to my timezone. Can this be done by using GWT. Please help.

Matt
Quote Reply
Re: Changeing the Date and Time in perl In reply to
Just subtract/add the number of seconds. For example, this server is in the east cost on EST, but I want PST, so for all calls to localtime() I do:

localtime(time - 10800);

which will return the time in PST.

Cheers,

Alex
Quote Reply
Re: Changeing the Date and Time in perl In reply to
How do you change the date on a server?

Matt