[Bps-public-commit] r14771 - Prophet/branches/creator/lib/Prophet

sartak at bestpractical.com sartak at bestpractical.com
Mon Aug 4 19:02:45 EDT 2008


Author: sartak
Date: Mon Aug  4 19:02:44 2008
New Revision: 14771

Modified:
   Prophet/branches/creator/lib/Prophet/ChangeSet.pm

Log:
Add a timestamp for when changesets are created

Modified: Prophet/branches/creator/lib/Prophet/ChangeSet.pm
==============================================================================
--- Prophet/branches/creator/lib/Prophet/ChangeSet.pm	(original)
+++ Prophet/branches/creator/lib/Prophet/ChangeSet.pm	Mon Aug  4 19:02:44 2008
@@ -9,6 +9,17 @@
     isa => 'Str',
 );
 
+has created => (
+    is      => 'rw',
+    isa     => 'Str',
+    default => sub {
+        my ($sec, $min, $hour, $day, $month, $year) = gmtime;
+        return sprintf '%04d-%02d-%02d %02d:%02d:%02d',
+            $year, $month, $day,
+            $hour, $min, $sec;
+    },
+);
+
 has source_uuid => (
     is  => 'rw',
     isa => 'Str',
@@ -123,7 +134,7 @@
 =cut
 
 our @SERIALIZE_PROPS
-    = (qw(creator sequence_no source_uuid original_source_uuid original_sequence_no is_nullification is_resolution));
+    = (qw(creator created sequence_no source_uuid original_source_uuid original_sequence_no is_nullification is_resolution));
 
 sub as_hash {
     my $self = shift;



More information about the Bps-public-commit mailing list