https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39748 --- Comment #51 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #50)
Wondering if we shouldn't also fix dt_from_string:
@ Koha/DateUtils.pm:72 @ sub dt_from_string { my $server_tz = C4::Context->tz; $tz = C4::Context->tz unless $tz;
- return DateTime->now( time_zone => $tz ) unless $date_string; + unless($date_string){ + my $dt = eval {DateTime->now( time_zone => $tz )}; + if ($@){ + $tz = DateTime::TimeZone->new( name => 'floating' ); + $dt = DateTime->new({time_sone => $tz}); + } + return $dt; + }
But that's for another day...
I think that could also create subtle bugs if there are comparisons between a UTC/local timezone and a floating timezone. But... I was thinking it would be good at the end of dt_from_string to use the $tz that is passed in as an argument to dt_from_string. That would be a really useful change. -- You are receiving this mail because: You are watching all bug changes.