develooper Front page | perl.datetime | Postings from December 2004

Re: ANNOUNCE: DateTime 0.23

Thread Previous | Thread Next
From:
Dave Rolsky
Date:
December 10, 2004 09:57
Subject:
Re: ANNOUNCE: DateTime 0.23
Message ID:
Pine.LNX.4.61.0412101157310.32502@urth.org
On Fri, 10 Dec 2004, Eugene van der Pijll wrote:

> Dave Rolsky schreef:
>> Anyway, enjoy ...
>>
>> 0.23    2004-12-09 (the "oh how I hate leap seconds" release)
>
> Dave, I don't really know how to tell you, but...
>
>    use DateTime;
>
>    print "DateTime $DateTime::VERSION\n";
>    $dt = DateTime->new(year => 1997, month => 7, day => 1,
>                        hour => 1, minute => 0, second => 0,
>                        time_zone => '0100');
>    print "$dt local = ";
>    $dt->set_time_zone('UTC');
>    print "$dt UTC\n";
>
> prints
>
>    DateTime 0.23
>    1997-07-01T01:00:00 local = 1997-07-01T00:00:-01 UTC
>
> The conversion to UTC is 1 second off between (and including) the local
> datetimes 1997-07-01T01:00:00 and 1997-07-01T23:59:59, that is, from
> the second after a leap second, until the end of the day.
>
> This includes
>
>    $dt = DateTime->new(year => 1997, month => 7, day => 1,
>                        hour => 23, minute => 59, second => 59,
>                        time_zone => '0100');
>
> which results in
>
>    1997-07-02T00:00:-01 local = 1997-07-01T22:59:58 UTC

Grr.  I think I know what this is, and fixing it shouldn't be too hard. 
Look for a 0.24 sometime soon.


-dave

/*===========================
VegGuide.Org
Your guide to all that's veg.
===========================*/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About