diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-02 00:32:12 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-02 00:32:12 +0000 |
commit | 25b35c3c7403202aae19c4a328f6af4d2aae2e68 (patch) | |
tree | d0a70746c1e9b6bca4bc5c3fff2921eb722e569e | |
parent | 8966b8504c3cedb11ca961c7722af23f0044a89c (diff) |
* Honor LC_CTIME when formatting a time for display. Thanks, Faidon
Liambotis.
-rw-r--r-- | IkiWiki/Render.pm | 2 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | doc/bugs/utf8_html_templates.mdwn | 16 |
3 files changed, 20 insertions, 2 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index d4e498188..22fba3a2f 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -230,7 +230,7 @@ sub check_overwrite ($$) { #{{{ sub displaytime ($) { #{{{ my $time=shift; - if ($config{timeformat} eq '%c') { + if ($config{timeformat} eq '%c' && ! exists $ENV{LC_CTIME}) { return scalar(localtime($time)); # optimisation } else { diff --git a/debian/changelog b/debian/changelog index 974d3c4b6..50f9c1e60 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,10 @@ ikiwiki (1.8) UNRELEASED; urgency=low for a page not being an orphan. * Support pinging services such as Technorati using XML-RPC to notify them about changes to rss feeds. + * Honor LC_CTIME when formatting a time for display. Thanks, Faidon + Liambotis. - -- Joey Hess <joeyh@debian.org> Mon, 26 Jun 2006 20:41:45 -0400 + -- Joey Hess <joeyh@debian.org> Sat, 1 Jul 2006 20:28:26 -0400 ikiwiki (1.7) unstable; urgency=low diff --git a/doc/bugs/utf8_html_templates.mdwn b/doc/bugs/utf8_html_templates.mdwn new file mode 100644 index 000000000..6a3c5661c --- /dev/null +++ b/doc/bugs/utf8_html_templates.mdwn @@ -0,0 +1,16 @@ +HTML::Template does not read files as utf-8, so modifying ikiwiki's +template files to contain utf-8 won't currently work. + +It seems that the best way to fix this would be to make HTML::Template +support utf-8. + +A workaround is to change all the template reading code like this: + + - my $template=HTML::Template->new(blind_cache => 1, + - filename => "$config{templatedir}/page.tmpl"); + + open(TMPL, "<:utf8", "$config{templatedir}/page.tmpl"); + + my $template=HTML::Template->new(filehandle => *TMPL); + + close(TMPL); + +However, this will make ikiwiki slower when rebuilding a wiki, since it +won't cache templates. |