Lines 64-70
sub dt_from_string {
Link Here
|
64 |
my $server_tz = C4::Context->tz; |
64 |
my $server_tz = C4::Context->tz; |
65 |
$tz = C4::Context->tz unless $tz; |
65 |
$tz = C4::Context->tz unless $tz; |
66 |
|
66 |
|
67 |
return DateTime->now( time_zone => $tz ) unless $date_string; |
67 |
unless( $date_string ) { |
|
|
68 |
# my $dt = DateTime->now( time_zone => $tz ); |
69 |
my $dt = DateTime->now( time_zone => $server_tz ); |
70 |
warn "L069 ". $dt->time_zone_short_name; |
71 |
return $dt; |
72 |
} |
68 |
|
73 |
|
69 |
$date_format = C4::Context->preference('dateformat') unless $date_format; |
74 |
$date_format = C4::Context->preference('dateformat') unless $date_format; |
70 |
|
75 |
|
Lines 245-250
sub dt_from_string {
Link Here
|
245 |
|
250 |
|
246 |
# Convert to configured timezone (unless we started with a dateonly string or had to drop to floating time) |
251 |
# Convert to configured timezone (unless we started with a dateonly string or had to drop to floating time) |
247 |
$dt->set_time_zone($server_tz) unless ( $date_only || $floating ); |
252 |
$dt->set_time_zone($server_tz) unless ( $date_only || $floating ); |
|
|
253 |
# $dt->set_time_zone($server_tz) unless $floating; |
254 |
warn "L249 ". $server_tz->name.' '.$dt->time_zone_short_name; |
248 |
|
255 |
|
249 |
return $dt; |
256 |
return $dt; |
250 |
} |
257 |
} |
251 |
- |
|
|