Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

localtime question

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

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 21:56 UTC
    isdst => is daylight savings time (yes/no)
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 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.

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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-23 18:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found