From: Matt S Trout Date: Wed, 8 Aug 2007 10:47:39 +0000 (+0000) Subject: timestamp+pg fix X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f011970e615a6a365688593c851a61d0a1fa1a31;p=dbsrgits%2FDBIx-Class-Historic.git timestamp+pg fix --- diff --git a/Changes b/Changes index fc01c30..821e345 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for DBIx::Class + - add timestamp fix re rt.cpan 26978 - no test yet but change + clearly should cause no regressions - provide alias for related_resultset via local() so it's set correctly at resultset construction time (fixes RestrictWithObject) - fixes bind params in debug statements diff --git a/lib/DBIx/Class/InflateColumn/DateTime.pm b/lib/DBIx/Class/InflateColumn/DateTime.pm index f92481d..df92390 100644 --- a/lib/DBIx/Class/InflateColumn/DateTime.pm +++ b/lib/DBIx/Class/InflateColumn/DateTime.pm @@ -54,7 +54,7 @@ sub register_column { $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(