X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b522d8cddaa27d20eefbab762a33a3676ba0985c..451c7d61a6d7db1d7d6d081023bdb28ebd1f782c:/IkiWiki.pm?ds=inline diff --git a/IkiWiki.pm b/IkiWiki.pm index 7d1f5c401..fdf3e5c47 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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, @@ -477,7 +485,7 @@ sub getsetup () { }, setuptype => { type => "internal", - default => "Standard", + default => "Yaml", description => "perl class to use to dump setup file", safe => 0, rebuild => 0, @@ -497,7 +505,6 @@ sub defaultconfig () { foreach my $key (keys %s) { push @ret, $key, $s{$key}->{default}; } - use Data::Dumper; return @ret; } @@ -529,6 +536,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}}; @@ -1168,7 +1181,7 @@ sub urlto ($;$$) { } if (! defined $from) { - my $u = $local_url; + my $u = $local_url || ''; $u =~ s{/$}{}; return $u.beautify_urlpath("/".$to); }