diff options
author | smcv <smcv@web> | 2016-12-26 15:26:25 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2016-12-26 15:26:25 -0400 |
commit | 836f165939d4111a41185952931f8e3ea5c0dca0 (patch) | |
tree | 0ba81246b19af05f64701f61a93f80ba86241699 /doc | |
parent | 1a73c8d5284093de58b71cf26830c2aacf350b4f (diff) | |
download | ikiwiki-836f165939d4111a41185952931f8e3ea5c0dca0.tar ikiwiki-836f165939d4111a41185952931f8e3ea5c0dca0.tar.gz |
Added a comment
Diffstat (limited to 'doc')
-rw-r--r-- | doc/forum/How_to_parse___34__:__47__etc__47__localtime__34___timezone__63__/comment_1_76d7e1f18828ce2767ba4f98a1901c29._comment | 22 |
1 files changed, 22 insertions, 0 deletions
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')`.) +"""]] |