Bugzilla – Attachment 154318 Details for
Bug 34489
Koha/Patrons.t: Subtests get_age and is_valid_age do not pass in another timezone
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34489: Testing
Bug-34489-Testing.patch (text/plain), 1.29 KB, created by
Marcel de Rooy
on 2023-08-08 14:09:04 UTC
(
hide
)
Description:
Bug 34489: Testing
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-08-08 14:09:04 UTC
Size:
1.29 KB
patch
obsolete
>From ca292e6346ed7888efa19ef9763570668dfce34b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 9 Aug 2023 01:44:53 +1200 >Subject: [PATCH] Bug 34489: Testing >Content-Type: text/plain; charset=utf-8 > >--- > Koha/DateUtils.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/Koha/DateUtils.pm b/Koha/DateUtils.pm >index 86c8314b4f..11751f4220 100644 >--- a/Koha/DateUtils.pm >+++ b/Koha/DateUtils.pm >@@ -64,7 +64,12 @@ 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 = DateTime->now( time_zone => $tz ); >+ my $dt = DateTime->now( time_zone => $server_tz ); >+ warn "L069 ". $dt->time_zone_short_name; >+ return $dt; >+ } > > $date_format = C4::Context->preference('dateformat') unless $date_format; > >@@ -245,6 +250,8 @@ sub dt_from_string { > > # Convert to configured timezone (unless we started with a dateonly string or had to drop to floating time) > $dt->set_time_zone($server_tz) unless ( $date_only || $floating ); >+ # $dt->set_time_zone($server_tz) unless $floating; >+warn "L249 ". $server_tz->name.' '.$dt->time_zone_short_name; > > return $dt; > } >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34489
:
154318
|
156285
|
156386