Chromium Code Reviews| Index: testing_support/git/repo.py |
| diff --git a/testing_support/git/repo.py b/testing_support/git/repo.py |
| index af45bafa3032df3e7946a13069b4952f1ff3be34..bbfe101fa21e91dc6859e011d571fa14f895318d 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,14 @@ class GitRepo(object): |
| Args: |
| schema - An instance of GitRepoSchema |
| """ |
| + class UTC(datetime.tzinfo): |
| + def utcoffset(self, dt): return datetime.timedelta(0) |
|
agable
2014/09/03 16:20:41
Despite being an inner class, please follow style.
Sergiy Byelozyorov
2014/09/03 16:22:33
Done.
|
| + def dst(self, dt): return datetime.timedelta(0) |
|
agable
2014/09/03 16:20:41
The dst and tzname functions aren't strictly neces
Sergiy Byelozyorov
2014/09/03 16:22:33
Done.
|
| + def tzname(self, dt): return 'UTC' |
| + |
| 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'] |