Parameterize utcOffset during construction

Allows for control over timezone offset in a simple, optional manner
This commit is contained in:
carmazine 2020-06-12 22:46:09 +02:00 committed by GitHub
parent 158efcf65c
commit 8da7c166c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,7 @@ class DateAxisItem(AxisItem):
"""
def __init__(self, orientation='bottom', **kwargs):
def __init__(self, orientation='bottom', utcOffset=time.timezone, **kwargs):
"""
Create a new DateAxisItem.
@ -211,7 +211,7 @@ class DateAxisItem(AxisItem):
super(DateAxisItem, self).__init__(orientation, **kwargs)
# Set the zoom level to use depending on the time density on the axis
self.utcOffset = time.timezone
self.utcOffset = utcOffset
self.zoomLevels = OrderedDict([
(np.inf, YEAR_MONTH_ZOOM_LEVEL),