changeset 193:e8b2a9e81beb

Store the W3C date + time form for each entry too. Thanks to MJ Ray
author Steve Kemp <steve@steve.org.uk>
date Mon, 14 Apr 2008 11:21:49 +0100
parents 48bc6f29d24e
children 4004fa368f64
files bin/chronicle
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bin/chronicle	Wed Apr 02 15:16:07 2008 +0100
+++ b/bin/chronicle	Mon Apr 14 11:21:49 2008 +0100
@@ -1613,11 +1613,18 @@
         my $hms = sprintf( "%02d:%02d:%02d", $hour, $min, $sec );
 
         #
-        #  Store the published date & time away.  Collapsing multiple
-        # spaces
+        # Store the published date & time away.
+        # [Collapsing multiple spaces]
         #
         $entry{'pubdate'} = time2str( "%a, %e %b %Y $hms GMT", $time );
         $entry{'pubdate'} =~ s/  +/ /g;
+
+        #
+        # Store the W3C date form
+        # http://www.w3.org/TR/NOTE-datetime
+        #
+        $entry{'w3cdate'} = time2str( "%Y-%m-%dT${hms}+00:00", $time );
+
     }
     else
     {