scrapinghub / dateparser

python parser for human readable dates
BSD 3-Clause "New" or "Revised" License
2.57k stars 465 forks source link

Fix PytzUsageWarning #1109

Closed serhii73 closed 2 weeks ago

serhii73 commented 1 year ago

Close #1089

>>> from datetime import datetime
>>> dateparser.parse(
...     "in 3 hours",
...     settings={
...         "TO_TIMEZONE": "UTC",
...         "RELATIVE_BASE": datetime.now(),
...     },
... )
datetime.datetime(2022, 12, 7, 14, 43, 47, 345343)
serhii73 commented 1 year ago

https://github.com/scrapinghub/dateparser/pull/1062 - Perhaps this would be helpful to fix this issue.