]> git.evergreen-ils.org Git - OpenSRF.git/commitdiff
LP#1762815 Empty client TZ defaults to server TZ (Perl)
authorBill Erickson <berickxx@gmail.com>
Tue, 10 Apr 2018 19:06:56 +0000 (15:06 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 1 May 2018 00:57:09 +0000 (20:57 -0400)
Fixes an issue in the Perl client time zone handling that resulted in
the server defaulting to UTC time instead of the server time zone when
no time zone value was received from the client.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Stephenson <jason@sigio.com>
src/perl/lib/OpenSRF/DomainObject/oilsMessage.pm

index 33675a8f0390df0030f9d6f8273778148f6a7b3c..b84c80c82050ccb728743b70aff7b7a6b4d25022 100644 (file)
@@ -244,6 +244,7 @@ sub handler {
 
        if( $val ) {
                local $ENV{TZ} = $tz || $ENV{TZ}; # automatic revert at the end of this scope
+               delete $ENV{TZ} unless $ENV{TZ}; # avoid UTC fall-back
                tzset();
                return OpenSRF::Application->handler($session, $self->payload);
        } else {