Empty client time zone fails to default to server time zone (Perl)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenSRF |
Fix Released
|
Medium
|
Unassigned | ||
2.5 |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
OpenSRF 3.0
Seen when executing the "Mark Item as Missing Pieces" action in Evergreen, where the print template generated by the Perl API contained UTC dates. This action uses JSON gateway instead of the translator/
Suffice to say, if no time zone is sent by the client, the server should default to the server time zone. It looks like it should be doing that in the Perl code, because a value of "" is applied when no time zone is sent. The tzset() code has other ideas in mind, though:
"If the TZ variable does appear in the environment, but its value is empty, or its value cannot be interpreted using any of the formats specified below, then Coordinated Universal Time (UTC) is used." -- from man 3 tzset
Deleting the $ENV{TZ} variable when no value is present before calling tzset() resolves the issue. Patch en route.
Changed in opensrf: | |
assignee: | nobody → Jason Stephenson (jstephenson) |
Changed in opensrf: | |
importance: | Undecided → Medium |
Changed in opensrf: | |
status: | Fix Committed → Fix Released |
Fix pushed:
http:// git.evergreen- ils.org/ ?p=working/ OpenSRF. git;a=shortlog; h=refs/ heads/user/ berick/ lp1762815- perl-null- client- tz