comments: Store dates in GMT and in ISO-8601

The [[!_comment]] directive is a serialization format, not something for
presentation to users, so we should use the least ambiguous possible
representation.
master
Simon McVittie 2008-12-12 11:02:41 +00:00
parent f2d5ead6af
commit 1942fc3bd6
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 2.00;
use Encode; use Encode;
use POSIX qw(strftime);
use constant PREVIEW => "Preview"; use constant PREVIEW => "Preview";
use constant POST_COMMENT => "Post comment"; use constant POST_COMMENT => "Post comment";
@ -437,7 +438,7 @@ sub sessioncgi ($$) { #{{{
$content .= " subject=\"$subject\"\n"; $content .= " subject=\"$subject\"\n";
} }
$content .= " date=\"" . IkiWiki::formattime(time, '%X %x') . "\"\n"; $content .= " date=\"" . decode_utf8(strftime('%Y-%m-%dT%H:%M:%SZ', gmtime)) . "\"\n";
$content .= " content=\"\"\"\n$editcontent\n\"\"\"]]\n"; $content .= " content=\"\"\"\n$editcontent\n\"\"\"]]\n";