Merge "Fix localtz() function"
This commit is contained in:
commit
e3fe357a51
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