add "smalldatetime" support to IC::DT
Rafael Kitover [Wed, 15 Jul 2009 22:54:22 +0000 (22:54 +0000)]
lib/DBIx/Class/InflateColumn/DateTime.pm

index fbdccbc..0b7e21e 100644 (file)
@@ -119,6 +119,9 @@ sub register_column {
     if ($type eq "timestamp with time zone" || $type eq "timestamptz") {
       $type = "timestamp";
       $info->{_ic_dt_method} ||= "timestamp_with_timezone";
+    } elsif ($type eq "smalldatetime") {
+      $type = "datetime";
+      $info->{_ic_dt_method} ||= "datetime";
     }
   }