edittemplate: use unambiguous RFC 3339 datestamps
These take into account the timezone offset (and convert it to UTC+0000) rather than being in an unspecified timezone.master
parent
d4b116d3bf
commit
26d62b386e
|
@ -156,7 +156,7 @@ sub filltemplate ($$) {
|
||||||
}
|
}
|
||||||
|
|
||||||
my $time = time();
|
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;
|
return $template->output;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,8 @@ These variables might be set:
|
||||||
(Requires the `UUID::Tiny` Perl module if not running on Linux.)
|
(Requires the `UUID::Tiny` Perl module if not running on Linux.)
|
||||||
|
|
||||||
* `<TMPL_VAR time>` is replaced with the current (template generation)
|
* `<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"]]
|
[[!meta robots="noindex, follow"]]
|
||||||
|
|
Loading…
Reference in New Issue