X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FInflateColumn%2FDateTime.pm;h=df92390e763010e3a67a8f254c8785867c0128a9;hp=f92481db22be0b97b88d01f26fc6ae664ce17f80;hb=f011970e615a6a365688593c851a61d0a1fa1a31;hpb=f103b03bb9f39c09b9e7a902e25811af401708e3 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(