Bug 1275409: move taskcluster_graph.from_now to taskgraph.util.time; r=wcosta

MozReview-Commit-ID: 3GFO4f34dg8

--HG--
rename : testing/taskcluster/tests/test_from_now.py => taskcluster/taskgraph/test/test_util_time.py
rename : testing/taskcluster/taskcluster_graph/from_now.py => taskcluster/taskgraph/util/time.py
extra : rebase_source : 5dfe5c92fa42c2837381232d3f1b343e93f6422e
This commit is contained in:
Dustin J. Mitchell 2016-06-04 19:20:07 +00:00
parent c1ccda957f
commit 6c587676b0
4 changed files with 14 additions and 3 deletions

View File

@ -18,7 +18,7 @@ from taskgraph.util.docker import docker_image
import taskcluster_graph.transform.routes as routes_transform
import taskcluster_graph.transform.treeherder as treeherder_transform
from taskgraph.util.templates import Templates
from taskcluster_graph.from_now import (
from taskgraph.util.time import (
json_time_from_now,
current_json_time,
)

View File

@ -28,7 +28,7 @@ from taskcluster_graph.mach_util import (
import taskcluster_graph.transform.routes as routes_transform
import taskcluster_graph.transform.treeherder as treeherder_transform
from taskcluster_graph.commit_parser import parse_commit
from taskcluster_graph.from_now import (
from taskgraph.util.time import (
json_time_from_now,
current_json_time,
)

View File

@ -1,7 +1,13 @@
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import unittest
import mozunit
from datetime import datetime
from taskcluster_graph.from_now import (
from taskgraph.util.time import (
InvalidString,
UnknownTimeMeasurement,
value_of,

View File

@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Python port of the ms.js node module this is not a direct port some things are
# more complicated or less precise and we lean on time delta here.
@ -88,3 +92,4 @@ def current_json_time():
'''
return datetime.datetime.utcnow().isoformat() + 'Z'