On Sat, 5 Nov 2005, Mike Schilli wrote:

Looks like this example doesn't work:

   Leap Seconds and Date Math

   The presence of leap seconds can cause some strange anomalies in date
   math.  For example, the following is a legal datetime:

       my $dt = DateTime->new( year => 1971, month => 12, day => 31,
                               hour => 23, minute => 59, second => 60,
                               time_zone => "UTC" );

It returns undef with DateTime 0.2901 and prints a warning:

   Invalid second value (60)

Oops. DT.pm used to think there was a leap second then, but it turns out there wasn't. I'll fix the docs.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to