From 9c42c24a68104f35fd02d5f6a1b93065eb9df674 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 11 Sep 2015 11:19:34 -0400 Subject: [PATCH] LP#1485374: Allow server timezone via CStoreEditor In a few cases, the server's timezone is preferable to the client's. One such case is display of due dates for circulations in My Account, so we provide a way to signal that we want to use the server's timezone, and so signal. Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm | 2 ++ Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm index d1a935e4bb..e381b21996 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm @@ -797,6 +797,8 @@ sub runmethod { $method .= '.atomic'; } + local $ENV{TZ} = $$options{no_tz} ? undef : $ENV{TZ}; + $method =~ s/search/id_list/o if $options->{idlist}; $method =~ s/\.atomic$//o if $self->substream($$options{substream} || 0); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 3dae3bff52..6af275f11b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -1415,7 +1415,7 @@ sub fetch_user_circs { $e->xact_begin; my $circs = $e->search_action_circulation( - [{id => \@circ_ids}, ($flesh) ? $qflesh : {}], {substream => 1}); + [{id => \@circ_ids}, ($flesh) ? $qflesh : {}], {substream => 1, no_tz => 1}); my @circs; for my $circ (@$circs) { -- 2.11.0