spulec/freezegun

Issue with dateparser

lesleyxyz opened this issue · 0 comments

Code

    @freeze_time("2012-01-01")
    def testTime(self):
        from datetime import datetime
        import dateparser

        print(datetime.now())
        print(dateparser.parse("2 hours ago"))

Output

2012-01-01 00:00:00
2011-12-31 23:00:00

Expected output

2012-01-01 00:00:00
2011-12-31 22:00:00

When not using freezegun, the two dates are correclty 2 hours apart.

Environment

freezegun==1.2.2
Ubuntu 22.04.2 LTS
Python 3.10.6