Looks like you have been into the Perl Cookbook in chapter 3 and that you have been looking at page 71. The edition I have erroneously states that the range for $yday is 1-366 (but it's really 1-365). I think that the range for $sec is also wrong (0-60 vs 0-59).

Pay special attention to the $isdst variable. It's going to come in handy on October 28 when we "fall back".

$isdst is important if your machine is set to Universal Time and you are processing epoch seconds that are expressed in a US time zone (Eastern for example). If you are doing date math on a UT box but using EST or EDT, you need to examine $isdst to know how many seconds to subtract.

I have been bitten by this, but that's because I'm dumb.

In reply to Re: date and time by Stegalex
in thread date and time by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.