]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Added a comment
authorsmcv <smcv@web>
Mon, 26 Dec 2016 19:26:25 +0000 (15:26 -0400)
committeradmin <admin@branchable.com>
Mon, 26 Dec 2016 19:26:25 +0000 (15:26 -0400)
doc/forum/How_to_parse___34__:__47__etc__47__localtime__34___timezone__63__/comment_1_76d7e1f18828ce2767ba4f98a1901c29._comment [new file with mode: 0644]

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 (file)
index 0000000..c3c14e2
--- /dev/null
@@ -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')`.)
+"""]]