]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
rename bugs/XSS_Alert...__33____33____33__.html to bugs/XSS_Alert...__33____33____33_...
[git.ikiwiki.info.git] / IkiWiki.pm
index 7afd57993a706d0324c758943450af8c0b3eb583..f414996db377d12a27dc7c408a766e6302b9cf02 100644 (file)
@@ -619,9 +619,20 @@ sub checkconfig () {
        if (defined $config{timezone} && length $config{timezone}) {
                $ENV{TZ}=$config{timezone};
        }
-       else {
+       elsif (defined $ENV{TZ} && length $ENV{TZ}) {
                $config{timezone}=$ENV{TZ};
        }
+       else {
+               eval q{use Config qw()};
+               error($@) if $@;
+
+               if ($Config::Config{d_gnulibc} && -e '/etc/localtime') {
+                       $config{timezone}=$ENV{TZ}=':/etc/localtime';
+               }
+               else {
+                       $config{timezone}=$ENV{TZ}='GMT';
+               }
+       }
 
        if ($config{w3mmode}) {
                eval q{use Cwd q{abs_path}};