Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: testing_support/git/repo.py

Issue 539553002: Removed dependency on pytz (Closed) Base URL: https://chromium.googlesource.com/infra/testing/testing_support@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing_support/git/repo.py
diff --git a/testing_support/git/repo.py b/testing_support/git/repo.py
index af45bafa3032df3e7946a13069b4952f1ff3be34..29cc70fc609341895933c4e3ea0bd261541d91bf 100644
--- a/testing_support/git/repo.py
+++ b/testing_support/git/repo.py
@@ -6,7 +6,6 @@ import atexit
import collections
import datetime
import os
-import pytz
import shutil
import subprocess
import sys
@@ -68,9 +67,12 @@ class GitRepo(object):
Args:
schema - An instance of GitRepoSchema
"""
+ class UTC(datetime.tzinfo):
+ def utcoffset(self, dt): return datetime.timedelta(0)
+
self.repo_path = tempfile.mkdtemp(dir=self.BASE_TEMP_DIR)
self.commit_map = {}
- self._date = datetime.datetime(1970, 1, 1, tzinfo=pytz.utc)
+ self._date = datetime.datetime(1970, 1, 1, tzinfo=UTC())
self.to_schema_refs = ['--branches']
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698