LP#1485374: Allow server timezone via CStoreEditor
authorMike Rylander <mrylander@gmail.com>
Fri, 11 Sep 2015 15:19:34 +0000 (11:19 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 23 Feb 2016 17:06:42 +0000 (12:06 -0500)
In rare cases, the server's timezone may be preferable to the client's.
To plan for such cases we provide a way to signal that we want to use the
server's timezone.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm

index d1a935e..e381b21 100644 (file)
@@ -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);