Skip to content

Instantly share code, notes, and snippets.

View haluzpav's full-sized avatar

Pavel Haluza haluzpav

View GitHub Profile
@haluzpav
haluzpav / jsons_bug_utc_datetime.py
Created February 16, 2019 16:54
Jsons bug - wrongly serialized utc datetime
import datetime
import jsons
# sanity check:
# my local time is 17:48:34, in +1 time-zone
dt_local = datetime.datetime.now()
print(dt_local)
# >>> 2019-02-16 17:48:34.714603
@haluzpav
haluzpav / jsons_bug.py
Last active February 10, 2019 23:47
Jsons bug - property of nested object
import dataclasses
import jsons
@dataclasses.dataclass
class B:
i: int
@property
def j(self):