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

People
Owner: Nobody in particular
Requestors: steve [...] yewtc.demon.co.uk
Cc:
AdminCc:

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



Subject: "in_units" not working for hours minutes and seconds
Date: Thu, 09 Apr 2015 10:57:11 +0100
To: bug-DateTime [...] rt.cpan.org
From: Steve Rogerson <steve [...] yewtc.demon.co.uk>
perl 5.18.4 Fedora : 3.19.1-201.fc21.x86_64 Version 1.12 my $d = DateTimeDuration->new(seconds=>3600) my @x = $d->in_units('hours','minutes','seconds') print "@x" gives : 0 0 3600 my $d = DateTimeDuration->new(minutes=>60) my @x = $d->in_units('hours','minutes','seconds') print "@x" gives : 1 0 0 Steve
This is documented at https://metacpan.org/pod/DateTime::Duration#dur-in_units Seconds can't be converted to minutes because of leap seconds. The number of seconds per minute is not fixed.