Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 26978
Status: resolved
Priority: 0/
Queue: DBIx-Class

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

Bug Information
Severity: Normal
Broken in: 0.07999_02
Fixed in: (no value)



Subject: [PATCH] InflateColumn::DateTime doesn't work with some postgres timestamp field types
Download (untitled) / with headers
text/plain 908b
This patch is a minor change to DBIx::Class::InflateColumn::DateTime to let it support some more timestamp field types found in PostgreSQL, which may be identified as 'timestamptz', 'timestamp with time zone', or 'timestamp without time zone' in addition to just 'timestamp'. Index: lib/DBIx/Class/InflateColumn/DateTime.pm =================================================================== --- lib/DBIx/Class/InflateColumn/DateTime.pm (revision 3263) +++ lib/DBIx/Class/InflateColumn/DateTime.pm (working copy) @@ -54,7 +54,7 @@ $self->next::method($column, $info, @rest); return unless defined($info->{data_type}); my $type = lc($info->{data_type}); - $type = 'datetime' if ($type eq 'timestamp'); + $type = 'datetime' if ($type =~ /timestamp/); if ($type eq 'datetime' || $type eq 'date') { my ($parse, $format) = ("parse_${type}", "format_${type}"); $self->inflate_column(
Download (untitled) / with headers
text/plain 386b
On Mon May 07 20:38:19 2007, JASONK wrote: Show quoted text
> This patch is a minor change to DBIx::Class::InflateColumn::DateTime to > let it support some more timestamp field types found in PostgreSQL, > which may be identified as 'timestamptz', 'timestamp with time zone', or > 'timestamp without time zone' in addition to just 'timestamp'.
Any chance of an addition to the pg tests to go with this?
stalled pending a patch with tests
Fixed in 0.08005, released to CPAN.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.