Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

GMT Offset

by Keef (Sexton)
on Apr 12, 2001 at 13:54 UTC ( [id://72004]=sourcecode: print w/replies, xml ) Need Help??
Category: Time
Author/Contact Info Keef
Description: This will display your current GMT Offset. For example, you have a script that displays the local time everywhere but you would like it to have GMT -0500 after the time. Well, when you enter or leave DST, you have to change all your hard links. Here is a small 2-line script that will produce your current offset in a pretty form. I believe Time::Timezone is included in the deafult lib, if not, Time::Timezone;;
use Time::Timezone;
my $offset = (sprintf "%0#3d", (tz_local_offset() / 3600)) . "00";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2026-01-18 17:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (122 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.