http://www.perlmonks.org?node_id=8099

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 05: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 19: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 19:01 UTC
    $isdst = Is Daylight Savings Time? 0||1.
RE: localtime question
by Anonymous Monk on Apr 20, 2000 at 19:51 UTC
    dst -> "daylight savings time"
RE: localtime question
by Anonymous Monk on Apr 20, 2000 at 21:56 UTC
    isdst => is daylight savings time (yes/no)
RE: localtime question
by Anonymous Monk on Apr 20, 2000 at 22: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.