Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 87498
Status: resolved
Priority: 0/
Queue: Date-Manip

People
Owner: Nobody in particular
Requestors: mark [...] mitsein.net
Cc:
AdminCc:

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



Subject: Date::Manip parse_format bug
Date: Wed, 31 Jul 2013 15:51:51 -0500
To: bug-Date-Manip [...] rt.cpan.org
From: Mark Keisler <mark [...] mitsein.net>
I'm trying to parse in a UNIX timestamp (epoch seconds) and parse_format is failing me: my $d = new Date::Manip::Date; $d->parse_format('%s',1375074000); yields: Can't locate object method "convert_from_gmt" via package "Date::Manip::Base" at /usr/share/perl5/vendor_perl/Date/Manip/Date.pm line 522. I've gotten the same failure in both version 6.24 and the current 6.40. Perhaps there is also a better way to parse in epoch seconds. If I just use parse(), that number above gives me a date in 2057 so that's not the way either :) -- Mark Keisler "I have been here. Now I am going there. Where? ... No, I won't have it!"
You found a bug. The parse_format method you use SHOULD have worked. However, it is inefficient. The best way to do it would be: $d->parse("epoch 13..."); That works, and gives the correct value. The parse_format bug will be fixed in the next release.
Subject: Re: [rt.cpan.org #87498] Date::Manip parse_format bug
Date: Wed, 31 Jul 2013 17:54:47 -0500
To: bug-Date-Manip [...] rt.cpan.org
From: Mark Keisler <mark [...] mitsein.net>
$d->parse("epoch 13..."); worked. Thanks for the workaround and the fix in advance. -- Mark Keisler "I have been here. Now I am going there. Where? ... No, I won't have it!" On Wed, Jul 31, 2013 at 5:00 PM, Sullivan Beck via RT < bug-Date-Manip@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87498 > > > You found a bug. The parse_format method you use SHOULD have worked. > However, it is inefficient. The best way to do it would be: > > $d->parse("epoch 13..."); > > That works, and gives the correct value. > > The parse_format bug will be fixed in the next release. > >
Just to clarify... using $d->parse("epoch XXX") is NOT a workaround. It's the documented way to parse seconds since the epoch. It has been in Date::Manip since 1998.
Subject: Re: [rt.cpan.org #87498] Date::Manip parse_format bug
Date: Thu, 1 Aug 2013 09:20:14 -0500
To: bug-Date-Manip [...] rt.cpan.org
From: Mark Keisler <mark [...] mitsein.net>
doh, I missed that in the Date::Manip::Date pod. Thanks again. -- Mark Keisler "I have been here. Now I am going there. Where? ... No, I won't have it!" On Thu, Aug 1, 2013 at 8:36 AM, Sullivan Beck via RT < bug-Date-Manip@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87498 > > > Just to clarify... > > using $d->parse("epoch XXX") > > is NOT a workaround. It's the documented way to parse seconds since the > epoch. It has been in Date::Manip since 1998. > > >