Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Date and Time

by DamnDirtyApe (Curate)
on Dec 03, 2002 at 02:12 UTC ( [id://217108]=note: print w/replies, xml ) Need Help??


in reply to Re: Date and Time
in thread Date and Time

Your adjustments are not necessary here. Assuming the only issue here is the time zone difference, try consolidating your code into something like the following:

my $server_tz = 0 ; # GMT my $client_tz = -8 ; # PST my $offset = $client_tz - $server_tz ; my @t = localtime( time + ( $offset * 3600 ) ) ; my $date = sprintf "%d/%d/%d", $t[4] + 1, $t[3], $t[5] + 1900 ;

_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.

            --Friedrich Nietzsche

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://217108]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-28 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found