Python Freezegun giving different values when freezing time to datetime.datetime.now()
问题 Im trying to use freezegun to set the clock back 10 seconds for a unit test. I've found that setting the time to now with freezegun results in the expected behavior for datetime.datetime.now() but somewhat different behavior for time.time() in that the "frozen" time is ~30,000 seconds behind (8 hours). Using datetime.datetime.utcnow(), its off by 3600 seconds (1 hour). What do I need to do to appropriately mock the time to be used with time.time()? Using now() : 8 hours off def test_freezegun