Bug 30540: eval on set_time_zone
This patch adds an eval around the call to set_time_zone so that we don't crash on invalid local dates and instead just keep the passed floating timezone. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
5bf08e4d49
commit
2562727648
|
|
@ -293,7 +293,7 @@ sub output_pref {
|
|||
# FIXME: see bug 13242 => no TZ for dates 'infinite'
|
||||
if ( $dt->ymd !~ /^9999/ ) {
|
||||
my $tz = $dateonly ? DateTime::TimeZone->new(name => 'floating') : C4::Context->tz;
|
||||
$dt->set_time_zone( $tz );
|
||||
eval { $dt->set_time_zone( $tz ); }
|
||||
}
|
||||
|
||||
my $pref =
|
||||
|
|
|
|||
Loading…
Reference in New Issue