Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Time Zones and Users

by count0 (Friar)
on Jan 10, 2002 at 22:32 UTC ( [id://137800]=note: print w/replies, xml ) Need Help??


in reply to Time Zones and Users

I've never done this, so I can't walk you through it... But here's a ray of light:

The Time-modules package from CPAN will definitely help (and specifically Time::Timezone).

Replies are listed 'Best First'.
Re: Re: Time Zones and Users
by Torgo (Beadle) on Jan 10, 2002 at 22:36 UTC
    The problem with Time::Timezone is that it relies on the $ENV{TZ} variable, which (as far as I can tell) relies on the /usr/share/zoneinfo files.

    --
    I write the code while the master is away!
      From Time::Zone (which is the same as Time::Timezone iirc):
      $TZ = defined($ENV{'TZ'}) ? ( $ENV{'TZ'} ? $ENV{'TZ'} : 'GMT' ) : '' unless $TZ;
      Where $TZ is taken as the first argument (to the functions needing a base timezone). =)

      So, in other words, you can pass it a value and it does not rely on there being a TZ environment variable.
        Wow. It would be nice if this module came with some documentation. Am I supposed to differentiate between *st/*dt (ie, weather daylight savings is "on" or "off") or can it do it itself? Looking at the code, I'm guessing it wouldn't help me much in that department.

        --
        I write the code while the master is away!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-03-29 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found