mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
Import UTC definition from utc8601 module.
Change-Id: I3ccd81090c4721b161aff272100aa71bc2f17055 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
8c6d85b817
commit
039fa938b1
@ -24,7 +24,7 @@
|
||||
$ python -m samba.subunit.run mylib.tests.test_suite
|
||||
"""
|
||||
|
||||
from samba.subunit import UTC
|
||||
from iso8601.iso8601 import Utc
|
||||
|
||||
import datetime
|
||||
import os
|
||||
@ -189,7 +189,7 @@ class TestProtocolClient(unittest.TestResult):
|
||||
|
||||
":param datetime: A datetime.datetime object.
|
||||
"""
|
||||
time = a_datetime.astimezone(UTC())
|
||||
time = a_datetime.astimezone(Utc())
|
||||
self._stream.write("time: %04d-%02d-%02d %02d:%02d:%02d.%06dZ\n" % (
|
||||
time.year, time.month, time.day, time.hour, time.minute,
|
||||
time.second, time.microsecond))
|
||||
@ -471,7 +471,7 @@ class AutoTimingTestResultDecorator(HookedTestResultDecorator):
|
||||
time = self._time
|
||||
if time is not None:
|
||||
return
|
||||
time = datetime.datetime.utcnow().replace(tzinfo=UTC())
|
||||
time = datetime.datetime.utcnow().replace(tzinfo=Utc())
|
||||
self.decorated.time(time)
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user