Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-Format-Pg CPAN distribution.

Report information
The Basics
Id: 25181
Status: new
Priority: 0/
Queue: DateTime-Format-Pg

People
Owner: dmaki [...] cpan.org
Requestors: CFAERBER [...] cpan.org
Cc:
AdminCc:

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



Subject: Infinity bug in DateTime::Format::Pg
Date: Tue, 27 Feb 2007 16:21:41 +0100
To: "DateTime::Format::Pg bugtracker" <bug-DateTime-Format-Pg [...] rt.cpan.org>
From: "Claus Färber (CFAERBER)" <CFAERBER [...] cpan.org>
Show quoted text
---------- Forwarded message ---------- From: Neil Bertram <neilb@catalyst.net.nz> Date: 27-Feb-2007 01:34 Subject: Infinity bug in DateTime::Format::Pg To: perl@faerber.muc.de -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, There seems to be a bug in DateTime::Format::Pg, where infinite timestamps are involved. Instead of using the strings '-infinity' and 'infinity', the module uses '-infinite' and 'infinite', which Postgres refuses to parse (at least under Postgres 8.1.8 on Ubuntu). This diff (against DateTime::Format::Pg 0.13 from CPAN) fixed my issues: - --- Pg.pm~ 2007-02-27 13:26:37.000000000 +1300 +++ Pg.pm 2007-02-27 13:26:37.000000000 +1300 @@ -720,7 +720,7 @@ { my ($self,$dt,%param) = @_; if($dt->is_infinite) { - - return $dt->isa('DateTime::Infinite::Future') ? 'infinite' : '-infinite'; + return $dt->isa('DateTime::Infinite::Future') ? 'infinity' : '-infinity'; } elsif($dt->year()<=0) { return sprintf('%04d-%02d-%02d %s BC', 1-$dt->year(), Thanks, Neil Bertram - -- Catalyst IT Limited Level 2, 150-154 Willis St PO Box 11053, Manners St, Wellington email : Neil.Bertram@catalyst.net.nz ph : 04 499 2267 ext 7384 ddi : 04 803 2384 fax : 04 499 5596 mob : 021 739 733 web : www.catalyst.net.nz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF43ykLviWzyS0NPMRAhshAJwOPYZyeFAO8O2hzw27mzxlGoCKNwCfdAA2 UDiXf09B3A6BZGRspR5PvRs= =tkUh -----END PGP SIGNATURE-----