diff options
author | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-12-12 11:02:41 +0000 |
---|---|---|
committer | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-12-12 11:02:41 +0000 |
commit | 1942fc3bd652868ab8d6842c2bb2bdf52c0ad9fb (patch) | |
tree | dab02e50d69a4af7e563c281b8b43ad29bc72a13 /IkiWiki | |
parent | f2d5ead6af148ab214ceb5f55406a1f0691e4261 (diff) | |
download | ikiwiki-1942fc3bd652868ab8d6842c2bb2bdf52c0ad9fb.tar ikiwiki-1942fc3bd652868ab8d6842c2bb2bdf52c0ad9fb.tar.gz |
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.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 9ea4a3f69..4ed696026 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -9,6 +9,7 @@ use warnings; use strict; use IkiWiki 2.00; use Encode; +use POSIX qw(strftime); use constant PREVIEW => "Preview"; use constant POST_COMMENT => "Post comment"; @@ -437,7 +438,7 @@ sub sessioncgi ($$) { #{{{ $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"; |