# HG changeset patch # User Steve Kemp # Date 1223333376 -3600 # Node ID c6cc5979109bbc8927b396513d609a1df15be348 # Parent e4d05c7d6557fb609e501a04fef9d0168dbf1ccd Byron Clark - Support non-GMT timezones. diff -r e4d05c7d6557 -r c6cc5979109b AUTHORS --- a/AUTHORS Mon Sep 01 20:38:56 2008 +0100 +++ b/AUTHORS Mon Oct 06 23:49:36 2008 +0100 @@ -11,6 +11,9 @@ Listed alphabetically by surname. + Byron Clark [byron [at] name.theclarkfamily.name] + - Support non-GMT timezones + Josh Grams [josh [@] com.qualdan] - Added better base URL detection. - Added chronological sorting for months & shorter month-URLs. diff -r e4d05c7d6557 -r c6cc5979109b bin/chronicle --- a/bin/chronicle Mon Sep 01 20:38:56 2008 +0100 +++ b/bin/chronicle Mon Oct 06 23:49:36 2008 +0100 @@ -1644,7 +1644,8 @@ # Get the Hours::Mins::Seconds from the Date: pseudo-header # my $time = str2time($date); - my $hms = time2str( "%H:%M:%S", $time ); + my $hms = time2str( "%H:%M:%S", $time ); + my $tz = time2str( "%z", $time ); # @@ -1664,6 +1665,7 @@ $hms = time2str( "%H:%M:%S", $mtime ); + $tz = "GMT"; } @@ -1676,14 +1678,16 @@ # # RSS 2 # - $entry{ 'pubdate' } = time2str( "%a, %e %b %Y $hms GMT", $time ); + $entry{ 'pubdate' } = time2str( "%a, %e %b %Y $hms $tz", $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 ); + my $w3ctz = $tz; + $w3ctz =~ s/([-+]\d\d)(\d\d)/$1:$2/; + $entry{ 'w3cdate' } = time2str( "%Y-%m-%dT${hms}$w3ctz", $time ); } else