From 836f165939d4111a41185952931f8e3ea5c0dca0 Mon Sep 17 00:00:00 2001 From: smcv Date: Mon, 26 Dec 2016 15:26:25 -0400 Subject: [PATCH] Added a comment --- ..._76d7e1f18828ce2767ba4f98a1901c29._comment | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/forum/How_to_parse___34__:__47__etc__47__localtime__34___timezone__63__/comment_1_76d7e1f18828ce2767ba4f98a1901c29._comment diff --git a/doc/forum/How_to_parse___34__:__47__etc__47__localtime__34___timezone__63__/comment_1_76d7e1f18828ce2767ba4f98a1901c29._comment b/doc/forum/How_to_parse___34__:__47__etc__47__localtime__34___timezone__63__/comment_1_76d7e1f18828ce2767ba4f98a1901c29._comment new file mode 100644 index 000000000..c3c14e281 --- /dev/null +++ b/doc/forum/How_to_parse___34__:__47__etc__47__localtime__34___timezone__63__/comment_1_76d7e1f18828ce2767ba4f98a1901c29._comment @@ -0,0 +1,22 @@ +[[!comment format=mdwn + username="smcv" + avatar="http://cdn.libravatar.org/avatar/0ee943fe632ff995f6f0f25b7167d03b" + subject="comment 1" + date="2016-12-26T19:26:25Z" + content=""" +`:/etc/localtime` is a glibc'ism, added to solve +[[bugs/without_timezone,_excessive_statting_causes_slowness]]. It means +\"read the contents or symlink destination of `/etc/localtime` and use that as +the active time zone\". + +I would not recommend parsing that string, although you could. + +ikiwiki sets the `TZ` environment variable to either `$config{timezone}` +or that default value during startup; so can't your plugin just use +local time unconditionally, via `time_zone => 'local'`, without ever +caring about which specific time zone that means? + +(For example, the standard `IkiWiki::formattime` uses `localtime($time)` which +is basically a non-OO version of +`DateTime->from_epoch(epoch => $time, time_zone => 'local')`.) +"""]] -- 2.39.5