aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/edittemplate.pm2
-rw-r--r--doc/ikiwiki/directive/edittemplate.mdwn4
2 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index 947c8f215..c2a8da29f 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -156,7 +156,7 @@ sub filltemplate ($$) {
}
my $time = time();
- $template->param(time => IkiWiki::formattime($time, "%Y-%m-%d %H:%M:%S"));
+ $template->param(time => IkiWiki::date_3339($time));
return $template->output;
}
diff --git a/doc/ikiwiki/directive/edittemplate.mdwn b/doc/ikiwiki/directive/edittemplate.mdwn
index 11cc89851..6269f5dd8 100644
--- a/doc/ikiwiki/directive/edittemplate.mdwn
+++ b/doc/ikiwiki/directive/edittemplate.mdwn
@@ -39,6 +39,8 @@ These variables might be set:
(Requires the `UUID::Tiny` Perl module if not running on Linux.)
* `<TMPL_VAR time>` is replaced with the current (template generation)
- time, using a fixed format, `%Y-%m-%d %H:%M:%S`.
+ time using a fixed format (RFC 3339, `%Y-%m-%dT%H:%M:%SZ`),
+ suitable for use in `\[[!meta date="<TMPL_VAR time>"]]`
+ (see [[meta]]) or `\[[!date "<TMPL_VAR time>"]]` (see [[date]]).
[[!meta robots="noindex, follow"]]