Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
We don't bite newbies here... much
 
PerlMonks  

localtime question

by Simplicus (Monk)
on Apr 20, 2000 at 00:36 UTC ( [id://8099]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

Simplicus has asked for the wisdom of the Perl Monks concerning the following question:

maybe silly of me, but can anyone tell me what the value of $n will represent, below?
@mytime = localtime(time); $n = $mytime[8];
the value is given as "$isdst" on the manpage and in Perl in a Nutshell. Can anyone help?
Thanks, S.-

Replies are listed 'Best First'.
Re: localtime question
by chromatic (Archbishop) on Apr 20, 2000 at 01:27 UTC
    Is Daylight Savings Time. 1 (or positive) is true, 0 is false, and negative means unknown. (That's what my manpage says for the system localtime call. Check yours for better details.)
      Thanks. Boy, do

      I

      feel sheepish.

      bah.
RE: localtime question
by Anonymous Monk on Apr 20, 2000 at 15:01 UTC
    $isdst = Is Daylight Savings Time? 0||1.
RE: localtime question
by Anonymous Monk on Apr 20, 2000 at 15:29 UTC
    $isdst is true if the specified time occurs during daylight savings time. Mike Schechter
RE: localtime question
by Anonymous Monk on Apr 20, 2000 at 15:51 UTC
    dst -> "daylight savings time"
RE: localtime question
by Anonymous Monk on Apr 20, 2000 at 17:56 UTC
    isdst => is daylight savings time (yes/no)
RE: localtime question
by Anonymous Monk on Apr 20, 2000 at 18:14 UTC
    $isdst tells whether or not daylight savings is in effect. I'd bet the return is 1 for yes and 0 for no, but I don't have an interpreter handy to try it out.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://8099]
Approved by root
help
Sections?
Information?
Find Nodes?
Leftovers?
    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.