diff options
| author | 2019-11-15 13:59:09 +0000 | |
|---|---|---|
| committer | 2019-11-15 13:59:09 +0000 | |
| commit | 5d01db8514f9b06d2e478c0d86ffafe137093d5b (patch) | |
| tree | dba9d73f611e804bf02b6ea7146b0a392be41939 /modules/git_webhooks | |
| parent | dont expose has_magic/get_magic in utils/__init__.py, ref directly (diff) | |
| signature | ||
move all datetime-related code from utils/__init__ to utils.datetime
Diffstat (limited to 'modules/git_webhooks')
| -rw-r--r-- | modules/git_webhooks/github.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py index a95be555..cdf9016d 100644 --- a/modules/git_webhooks/github.py +++ b/modules/git_webhooks/github.py @@ -178,7 +178,7 @@ class GitHub(object): return url def _iso8601(self, s): - return datetime.datetime.strptime(s, utils.ISO8601_PARSE) + return utils.datetime.iso8601_parse(s) def ping(self, data): return ["Received new webhook"] @@ -415,7 +415,7 @@ class GitHub(object): completed_at = self._iso8601(data["check_run"]["completed_at"]) if completed_at > started_at: seconds = (completed_at-started_at).total_seconds() - duration = " in %s" % utils.to_pretty_time(seconds) + duration = " in %s" % utils.datetime.to_pretty_time(seconds) status = data["check_run"]["status"] status_str = "" |
