Fix localtz() function
Closes-Bug: #2052593 Change-Id: I739b44829202f0edba94ff502cd06e6cba60a4d0
This commit is contained in:
parent
0d63eb1346
commit
269f966996
6
releasenotes/notes/bug-2052593-f683555b24f1fba7.yaml
Normal file
6
releasenotes/notes/bug-2052593-f683555b24f1fba7.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
The localtz YAQL function now returns daylight saving time when daylight
|
||||
saving is actually enabled in the system. Previously it returned daylight
|
||||
saving time if the system time zone has daylight saving time.
|
@ -322,7 +322,7 @@ def localtz():
|
||||
yaql> localtz().hours
|
||||
3.0
|
||||
"""
|
||||
if python_time.daylight:
|
||||
if python_time.localtime().tm_isdst:
|
||||
return TIMESPAN_TYPE(seconds=-python_time.altzone)
|
||||
else:
|
||||
return TIMESPAN_TYPE(seconds=-python_time.timezone)
|
||||
|
Loading…
Reference in New Issue
Block a user