From: Bill Erickson Date: Tue, 10 Apr 2018 19:06:56 +0000 (-0400) Subject: LP#1762815 Empty client TZ defaults to server TZ (Perl) X-Git-Tag: osrf_rel_3_1_0-beta~35 X-Git-Url: http://git.equinoxoli.org/?p=opensrf-equinox.git;a=commitdiff_plain;h=f8dfa10b7613799190524ae1bf635d6c90a97b98 LP#1762815 Empty client TZ defaults to server TZ (Perl) 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 Signed-off-by: Jason Stephenson --- diff --git a/src/perl/lib/OpenSRF/DomainObject/oilsMessage.pm b/src/perl/lib/OpenSRF/DomainObject/oilsMessage.pm index 33675a8..b84c80c 100644 --- a/src/perl/lib/OpenSRF/DomainObject/oilsMessage.pm +++ b/src/perl/lib/OpenSRF/DomainObject/oilsMessage.pm @@ -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 {