If neither timezone nor TZ is set, set both to :/etc/localtime if we're on a GNU system and that file exists, or GMT otherwise
parent
5c7a62dbd5
commit
943ec015da
13
IkiWiki.pm
13
IkiWiki.pm
|
@ -619,9 +619,20 @@ sub checkconfig () {
|
||||||
if (defined $config{timezone} && length $config{timezone}) {
|
if (defined $config{timezone} && length $config{timezone}) {
|
||||||
$ENV{TZ}=$config{timezone};
|
$ENV{TZ}=$config{timezone};
|
||||||
}
|
}
|
||||||
else {
|
elsif (defined $ENV{TZ} && length $ENV{TZ}) {
|
||||||
$config{timezone}=$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}) {
|
if ($config{w3mmode}) {
|
||||||
eval q{use Cwd q{abs_path}};
|
eval q{use Cwd q{abs_path}};
|
||||||
|
|
|
@ -8,6 +8,8 @@ ikiwiki (3.20150108) UNRELEASED; urgency=medium
|
||||||
bundle an old enough Encode.pm for that not to be a problem: the
|
bundle an old enough Encode.pm for that not to be a problem: the
|
||||||
system might have a newer Encode.pm installed separately, like Fedora 20.
|
system might have a newer Encode.pm installed separately, like Fedora 20.
|
||||||
(Closes: #776181; thanks, Anders Kaseorg)
|
(Closes: #776181; thanks, Anders Kaseorg)
|
||||||
|
* If neither timezone nor TZ is set, set both to :/etc/localtime if
|
||||||
|
we're on a GNU system and that file exists, or GMT otherwise
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Sat, 24 Jan 2015 23:59:20 -0400
|
-- Joey Hess <id@joeyh.name> Sat, 24 Jan 2015 23:59:20 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue