Skip to content

Commit

Permalink
add a patch to fix the python issue29097, it will happen when using p…
Browse files Browse the repository at this point in the history
…ython 3.6 to python 3.7 just on windows.
  • Loading branch information
hongweiduan committed Jul 29, 2023
1 parent 4ab57be commit 995daa2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion taos/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

_priv_tz = None
_utc_tz = pytz.timezone("UTC")
_datetime_epoch = datetime.fromtimestamp(0)
try:
_datetime_epoch = datetime.fromtimestamp(0)
except OSError:
_datetime_epoch = datetime.fromtimestamp(86400) - timedelta(seconds=86400)
_utc_datetime_epoch = _utc_tz.localize(datetime.utcfromtimestamp(0))


Expand Down

0 comments on commit 995daa2

Please sign in to comment.