From 19cd246ef4019ee4acd29764d0b619ee26e7b244 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 29 Jan 2026 11:51:02 -0500 Subject: [PATCH] Bug 40813: (follow-up) Add milliseconds Signed-off-by: Kyle M Hall --- C4/Auth.pm | 4 ++-- Koha/DateUtils.pm | 3 ++- koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 8414922ef0f..975fb81e0e0 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -165,7 +165,7 @@ Output.pm module. =cut sub get_template_and_user { - my $start_time = dt_from_string; + my $start_time = DateTime->from_epoch( epoch => Time::HiRes::time() ); my $in = shift; my ( $user, $cookie, $sessionID, $flags ); @@ -1239,7 +1239,7 @@ sub checkauth { : Koha::Cash::Registers->search( { branch => $branchcode, branch_default => 1 }, { rows => 1 } - )->single; + )->single; $register_id = $register->id if ($register); $register_name = $register->name if ($register); } diff --git a/Koha/DateUtils.pm b/Koha/DateUtils.pm index f822dfbf05f..604be135388 100644 --- a/Koha/DateUtils.pm +++ b/Koha/DateUtils.pm @@ -29,6 +29,7 @@ BEGIN { } use DateTime; +use Time::HiRes; use C4::Context; use Koha::Exceptions; use Koha::DateTime::Format::RFC3339; @@ -69,7 +70,7 @@ 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; + return DateTime->from_epoch( epoch => Time::HiRes::time(), time_zone => $tz ) unless $date_string; $date_format = C4::Context->preference('dateformat') unless $date_format; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc index c1340280d42..eb06243a998 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -98,7 +98,7 @@ Start - [% start_time.hms(':') | html %] + [% start_time.hms(':') | html %]:[% start_time.millisecond | format('%03d') | html %] @@ -106,7 +106,7 @@ End - [% end_time.hms(':') | html %] + [% end_time.hms(':') | html %]:[% end_time.millisecond | format('%03d') | html %] -- 2.50.1 (Apple Git-155)