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

Re: ANNOUNCE: DateTime 0.23

Thread Previous | Thread Next
Eugene van der Pijll
December 10, 2004 10:44
Re: ANNOUNCE: DateTime 0.23
Message ID:
Dave Rolsky schreef:
> Grr.  I think I know what this is, and fixing it shouldn't be too hard. 
> Look for a 0.24 sometime soon.


I've found one other problem, which may be related:

    $dt = DateTime->new(year => 1997, month => 6, day => 30,
                        hour => 23, minute => 59, second => 60,
                        time_zone => 'UTC')

sets $dt to 1997-07-01T23:59:90 . I'm not quite sure what the correct
answer would be here, but 23:59:90 isn't it.

It should probably be 1997-07-01T00:00:30, which is ambiguous (because
it's both 23:59:60 and 00:00:00 UTC), but that can't be helped, as the
location of the leap second is not defined when the tz offset is not an
integer number of minutes.

I found these bugs because I'm trying to write a timezone class for TAI
(as discussed a few months ago), and I need to be able to specify the
offset in seconds for this.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About