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: 78975
Status: rejected
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: HSW [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.76
Fixed in: (no value)



Subject: DateTime::Duration in seconds
Why DateTime::Duration can't return full delta in seconds (or other units)? Minimal code is: my ($m, $s) = $dt2->delta_ms( $dt1 )->in_units('minutes', 'seconds'); print Dumper( [$dt1->iso8601, $dt2->iso8601], $dt2->subtract_datetime( $dt1 )->in_units('seconds'), [$dt2->subtract_datetime( $dt1 )->in_units('minutes', 'seconds')], $dt2->delta_ms( $dt1 )->in_units('seconds'), [$dt2->delta_ms( $dt1 )->in_units('minutes', 'seconds')], $m*60+$s, ); $VAR1 = [ '2012-07-15T13:40:00', '2012-08-15T14:42:03' ]; $VAR2 = 3; $VAR3 = [ 62, 3 ]; $VAR4 = 3; $VAR5 = [ 44702, 3 ]; $VAR6 = 2682123;
Subject: Re: [rt.cpan.org #78975] DateTime::Duration in seconds
Date: Wed, 15 Aug 2012 09:13:32 -0500 (CDT)
To: Sergey Homenkow via RT <bug-DateTime [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 15 Aug 2012, Sergey Homenkow via RT wrote: Show quoted text
> Why DateTime::Duration can't return full delta in seconds (or other > units)?
Because of leap seconds. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/