diff options
| author | 2021-03-26 15:19:25 -0700 | |
|---|---|---|
| committer | 2021-03-26 15:19:25 -0700 | |
| commit | cc3c47463d4317b072810deb622d54dddf9a132c (patch) | |
| tree | 5710811250e188fb17215f70214851eda019550a /Pipfile | |
| parent | Use correct constant for each type of help session user (diff) | |
Switch to datetime.fromtimestamp() to avoid over-compensation
Previously we were using `utcfromtimestamp()` which would compensate
the timestamp when converting to UTC even though the timestamp itself
was in UTC:
>>> datetime.utcnow()
datetime.datetime(2021, 3, 26, 22, 8, 47, 441603)
>>> a = datetime.utcnow().timestamp()
1616821624.207364
>>> a = datetime.utcfromtimestamp(a)
datetime.datetime(2021, 3, 27, 5, 7, 4, 207364)
By switching to `fromtimestamp()` this avoids that behaviour.
Diffstat (limited to 'Pipfile')
0 files changed, 0 insertions, 0 deletions