]> git.mjollnir.org Git - cil.git/commitdiff
Use a explicit stringify method instead of an implicit one on DateTimes.
authorAndrew Chilton <andychilton@gmail.com>
Thu, 26 Jun 2008 12:20:10 +0000 (00:20 +1200)
committerAndrew Chilton <andychilton@gmail.com>
Thu, 26 Jun 2008 12:20:10 +0000 (00:20 +1200)
lib/CIL/Base.pm

index 681a544ed028faa1fd504b009ddd6d716c00f6c5..b08ebd8d89b5ccce2e5371d547b0eaf5dbdc2422 100644 (file)
@@ -178,7 +178,7 @@ sub set_no_update {
 
 sub set_inserted_now {
     my ($self) = @_;
-    my $time = '' . DateTime->now;
+    my $time = DateTime->now->iso8601;
     $self->{data}{Inserted} = $time;
     $self->{data}{Updated} = $time;
     $self->{Changed} = 1;
@@ -186,7 +186,7 @@ sub set_inserted_now {
 
 sub set_updated_now {
     my ($self) = @_;
-    my $time = '' . DateTime->now;
+    my $time = DateTime->now->iso8601;
     $self->{data}{Updated} = $time;
     $self->{Changed} = 1;
 }