From 2adcfe10d78536eef0e167db95f67f854bb09b87 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 18 May 2021 14:04:32 -0700 Subject: [PATCH] Pass tests in any timezone by using utcfromtimestamp --- certbot/tests/main_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certbot/tests/main_test.py b/certbot/tests/main_test.py index d2c19a5d1..4c063f1e6 100644 --- a/certbot/tests/main_test.py +++ b/certbot/tests/main_test.py @@ -1786,7 +1786,7 @@ class ReportNewCertTest(unittest.TestCase): self.notafter_patch = mock.patch('certbot._internal.main.crypto_util.notAfter') self.mock_notafter = self.notafter_patch.start() - self.mock_notafter.return_value = datetime.fromtimestamp(0) + self.mock_notafter.return_value = datetime.utcfromtimestamp(0) def tearDown(self): self.notify_patch.stop()