Add timezone setting in setup file. This alows time zone to be configured via the...
authorJoey Hess <joey@kitenet.net>
Thu, 24 Mar 2011 17:36:16 +0000 (13:36 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 24 Mar 2011 17:36:16 +0000 (13:36 -0400)
IkiWiki.pm
debian/changelog
doc/todo/configurable_timezones.mdwn

index 9de25a4b31dc46dd450b2a6ab60261f44e9f0401..1c05a7aa55215d638400831066b1ee17496b15b9 100644 (file)
@@ -336,6 +336,14 @@ sub getsetup () {
                safe => 0, # paranoia
                rebuild => 0,
        },
+       timezone => {
+               type => "string", 
+               default => "",
+               example => "US/Eastern",
+               description => "time zone name",
+               safe => 1,
+               rebuild => 1,
+       },
        include => {
                type => "string",
                default => undef,
@@ -529,6 +537,12 @@ sub checkconfig () {
                        $ENV{$val}=$config{ENV}{$val};
                }
        }
+       if (defined $config{timezone} && length $config{timezone}) {
+               $ENV{TZ}=$config{timezone};
+       }
+       else {
+               $config{timezone}=$ENV{TZ};
+       }
 
        if ($config{w3mmode}) {
                eval q{use Cwd q{abs_path}};
index b8a6c8c88149d238e5f9f12f10c02fd5060ed6c3..b483c29cc2839d914fda82e291c5d56396c0f339 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (3.20110322) UNRELEASED; urgency=low
+
+  * Add timezone setting in setup file. This alows time zone to be configured
+    via the web.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 24 Mar 2011 13:34:34 -0400
+
 ikiwiki (3.20110321) unstable; urgency=low
 
   * comment: Don't show comments of subpages on parent pages.
index f8b1dbbaba7bd57857c9767d6acb3e4ad10e6413..36f2e9dbb52eca486632d9bfb0d7e26173e9bd63 100644 (file)
@@ -4,7 +4,4 @@ This is nice for shared hosting, and other situation where the user doesn't have
 
 > [[done]] via the ENV setting in the setup file. --[[Joey]]
 
-
-Example (ikiwiki.setup):
-
-    ENV => { TZ => "Europe/Sofia" }
+>> Now via a timezone setting that is web configurable. --[[Joey]]