We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@freeze_time("2012-01-01") def testTime(self): from datetime import datetime import dateparser print(datetime.now()) print(dateparser.parse("2 hours ago"))
2012-01-01 00:00:00 2011-12-31 23:00:00
2012-01-01 00:00:00 2011-12-31 22:00:00
When not using freezegun, the two dates are correclty 2 hours apart.
freezegun==1.2.2 Ubuntu 22.04.2 LTS Python 3.10.6
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Code
Output
Expected output
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
The text was updated successfully, but these errors were encountered: