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

Re: ANNOUNCE: DateTime 0.23

Thread Previous | Thread Next
From:
Eugene van der Pijll
Date:
December 10, 2004 10:44
Subject:
Re: ANNOUNCE: DateTime 0.23
Message ID:
20041210184432.GA3000@alva.zevenwouden
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.

Great!

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')
                  ->set_time_zone('00:00:30');

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.

Eugene

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