Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 98733
Status: resolved
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: bbkr [...] post.pl
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.14



Method subtract_datetime_absolute is not consistent with epoch difference: perl -e 'use DateTime; my $d1 = DateTime->new( time_zone => 'UTC', year => 2000); my $d2 = DateTime->new( time_zone => 'UTC', year => 2100); print "subtract: " . $d1->subtract_datetime_absolute($d2)->in_units("seconds") . $/; print "epochs: " . ($d1->epoch - $d2->epoch) . $/' subtract: -3155760003 epochs: -3155760000
From: bbkr [...] post.pl
After some research i think it is related to leap seconds - 3 corrections were made since 2000: http://en.wikipedia.org/wiki/Leap_second#mediaviewer/File:Leapsecond.ut1-utc.svg Worth adding to documentation in caveats section.