From: Matt S Trout Date: Thu, 22 Jun 2006 22:45:37 +0000 (+0000) Subject: added support for timestamps to InflateColumn::DateTime X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ae74c3bf530ac1b404352fbfcccb7ad6292c8569;p=dbsrgits%2FDBIx-Class-Historic.git added support for timestamps to InflateColumn::DateTime --- diff --git a/lib/DBIx/Class/InflateColumn/DateTime.pm b/lib/DBIx/Class/InflateColumn/DateTime.pm index db6d3a7..3734b71 100644 --- a/lib/DBIx/Class/InflateColumn/DateTime.pm +++ b/lib/DBIx/Class/InflateColumn/DateTime.pm @@ -52,6 +52,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'); if ($type eq 'datetime' || $type eq 'date') { my ($parse, $format) = ("parse_${type}", "format_${type}"); $self->inflate_column(