On Sat, 5 Nov 2005, Mike Schilli wrote:
From the DateTime documentation, I would have thought that leap seconds
apply
to all time zones (except floating ones), but the following code
use DateTime;
for my $time_zone (qw(UTC America/Los_Angeles)) {
my $now = DateTime->new(
year => 1972,
month => 12,
day => 31,
hour => 23,
Argh, please disregard this one. Setting the hour to 15 according to the time
difference will fix it of course. Sorry!
-- Mike
Mike Schilli
[EMAIL PROTECTED]
minute => 59,
second => 0,
time_zone => $time_zone
);
my $later = $now->clone()->add( seconds => 60 );
print "$time_zone: ", $later->datetime(), "\n";
}
prints
UTC: 1972-12-31T23:59:60
America/Los_Angeles: 1973-01-01T00:00:00
and seems to suggest that you get the leap second only in UTC. Is this
correct?
-- Mike
Mike Schilli
[EMAIL PROTECTED]