Skip to content

Commit a424af7

Browse files
authored
Merge pull request #31 from highcharts-for-python/develop
PR for v.1.2.3
2 parents c644e88 + 5516ad3 commit a424af7

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Release 1.2.3
2+
=========================================
3+
4+
* **BUGFIX:** Fixed refernece bug in serialization of ``GanttData`` instances with timezone-naive ``datetime`` instances in ``start and ``end``.
5+
6+
------------------
7+
18
Release 1.2.2
29
=========================================
310

highcharts_gantt/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.2.2'
1+
__version__ = '1.2.3'

highcharts_gantt/options/series/data/gantt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Optional, List
22
from decimal import Decimal
3-
from datetime import datetime, date
3+
from datetime import datetime, date, timezone
44

55
from validator_collection import validators, checkers
66

@@ -346,13 +346,13 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
346346

347347
if self.end is not None and hasattr(self.end, 'timestamp'):
348348
if not self.end.tzinfo:
349-
self.end = self.end.replace(tzinfo = datetime.timezone.utc)
349+
self.end = self.end.replace(tzinfo = timezone.utc)
350350
untrimmed['end'] = self.end.timestamp() * 1000
351351
else:
352352
untrimmed['end'] = self.end
353353
if self.start is not None and hasattr(self.start, 'timestamp'):
354354
if not self.start.tzinfo:
355-
self.start = self.start.replace(tzinfo = datetime.timezone.utc)
355+
self.start = self.start.replace(tzinfo = timezone.utc)
356356

357357
untrimmed['start'] = self.start.timestamp() * 1000
358358
else:

0 commit comments

Comments
 (0)