Explorar o código

Set default time that's not dependent on local timezone.

Jelmer Vernooij %!s(int64=7) %!d(string=hai) anos
pai
achega
996f4dec87
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      dulwich/tests/utils.py

+ 1 - 1
dulwich/tests/utils.py

@@ -126,7 +126,7 @@ def make_commit(**attrs):
     :param attrs: dict of attributes to overwrite from the default values.
     :param attrs: dict of attributes to overwrite from the default values.
     :return: A newly initialized Commit object.
     :return: A newly initialized Commit object.
     """
     """
-    default_time = int(time.mktime(datetime.datetime(2010, 1, 1).timetuple()))
+    default_time = 1262304000  # 2010-01-01 00:00:00
     all_attrs = {'author': b'Test Author <test@nodomain.com>',
     all_attrs = {'author': b'Test Author <test@nodomain.com>',
                  'author_time': default_time,
                  'author_time': default_time,
                  'author_timezone': 0,
                  'author_timezone': 0,