diff options
| author | Paul Ganssle <paul@ganssle.io> | 2019-04-23 13:44:18 -0400 |
|---|---|---|
| committer | Paul Ganssle <paul@ganssle.io> | 2019-04-23 13:54:57 -0400 |
| commit | 7febd7bb20432f862e461f1b66fab62b1066db1a (patch) | |
| tree | f7d9335a85189874062f90c08398f96f27fc06d8 /docs | |
| parent | 0bfaa02c2dd396e563bd9343543874364e6b75bf (diff) | |
| download | dateutil-git-7febd7bb20432f862e461f1b66fab62b1066db1a.tar.gz | |
Update use of tz.UTC in examples
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/examples.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/examples.rst b/docs/examples.rst index 21270ca..fccbce5 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1209,15 +1209,15 @@ tzutc examples .. doctest:: tzutc >>> from datetime import * - >>> from dateutil.tz import * + >>> from dateutil import tz >>> datetime.now() datetime.datetime(2003, 9, 27, 9, 40, 1, 521290) - >>> datetime.now(tzutc()) + >>> datetime.now(tz.UTC) datetime.datetime(2003, 9, 27, 12, 40, 12, 156379, tzinfo=tzutc()) - >>> datetime.now(tzutc()).tzname() + >>> datetime.now(tz.UTC).tzname() 'UTC' @@ -1237,7 +1237,7 @@ tzoffset examples >>> datetime.now(tzoffset("BRST", -10800)).tzname() 'BRST' - >>> datetime.now(tzoffset("BRST", -10800)).astimezone(tzutc()) + >>> datetime.now(tzoffset("BRST", -10800)).astimezone(UTC) datetime.datetime(2003, 9, 27, 12, 53, 11, 446419, tzinfo=tzutc()) @@ -1383,7 +1383,7 @@ tzfile examples .. testsetup:: tzfile from datetime import datetime - from dateutil.tz import tzfile, tzutc + from dateutil.tz import tzfile, UTC .. doctest:: tzfile :options: +NORMALIZE_WHITESPACE @@ -1393,7 +1393,7 @@ tzfile examples datetime.datetime(2003, 9, 27, 12, 3, 48, 392138, tzinfo=tzfile('/etc/localtime')) - >>> datetime.now(tz).astimezone(tzutc()) + >>> datetime.now(tz).astimezone(UTC) datetime.datetime(2003, 9, 27, 15, 3, 53, 70863, tzinfo=tzutc()) |
