diff --git a/tests/unittests/general/prefix_ip_collector_test.py b/tests/unittests/general/prefix_ip_collector_test.py index f90b84dbf4..a6655113b0 100644 --- a/tests/unittests/general/prefix_ip_collector_test.py +++ b/tests/unittests/general/prefix_ip_collector_test.py @@ -3,7 +3,7 @@ """Tests for prefix_ip_collector""" import unittest -from datetime import datetime +from datetime import datetime, timezone from nav.activeipcollector.manager import find_range, get_timestamp @@ -14,5 +14,5 @@ def test_find_range(self): self.assertEqual(find_range('2001:700:0:251e::/64'), 0) def test_find_timestamp(self): - ts = datetime(2012, 10, 4, 14, 30) - self.assertEqual(get_timestamp(ts), 1349353800) + ts = datetime(2012, 10, 4, 14, 30, tzinfo=timezone.utc) + self.assertEqual(get_timestamp(ts), 1349361000)