diff options
author | Stuart Bishop <stuart.bishop@canonical.com> | 2019-07-31 15:32:44 +0000 |
---|---|---|
committer | Stuart Bishop <stuart.bishop@canonical.com> | 2019-07-31 15:32:44 +0000 |
commit | a2c7caaad0746a0bd787269a0ad5967281d84204 (patch) | |
tree | 63a8c536ba880a9d077ff4ee73b8b65b77a60f14 | |
parent | f417f5398e4df1ef79c6c3835368f72b39a08af7 (diff) | |
download | pytz-git-a2c7caaad0746a0bd787269a0ad5967281d84204.tar.gz |
Adjust doctests to work with Python 3.8
Further addresses lp:1819751 with fix from Victor Stinner
-rw-r--r-- | src/README.txt | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/README.txt b/src/README.txt index b37acf0..eff1a6b 100644 --- a/src/README.txt +++ b/src/README.txt @@ -177,29 +177,29 @@ parameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods. The ``is_dst`` parameter is ignored for most timestamps. It is only used during DST transition ambiguous periods to resolve that ambiguity. ->>> tz.utcoffset(normal, is_dst=True) -datetime.timedelta(-1, 77400) ->>> tz.dst(normal, is_dst=True) -datetime.timedelta(0, 3600) +>>> print(tz.utcoffset(normal, is_dst=True)) +-1 day, 21:30:00 +>>> print(tz.dst(normal, is_dst=True)) +1:00:00 >>> tz.tzname(normal, is_dst=True) 'NDT' ->>> tz.utcoffset(ambiguous, is_dst=True) -datetime.timedelta(-1, 77400) ->>> tz.dst(ambiguous, is_dst=True) -datetime.timedelta(0, 3600) +>>> print(tz.utcoffset(ambiguous, is_dst=True)) +-1 day, 21:30:00 +>>> print(tz.dst(ambiguous, is_dst=True)) +1:00:00 >>> tz.tzname(ambiguous, is_dst=True) 'NDT' ->>> tz.utcoffset(normal, is_dst=False) -datetime.timedelta(-1, 77400) +>>> print(tz.utcoffset(normal, is_dst=False)) +-1 day, 21:30:00 >>> tz.dst(normal, is_dst=False) datetime.timedelta(0, 3600) >>> tz.tzname(normal, is_dst=False) 'NDT' ->>> tz.utcoffset(ambiguous, is_dst=False) -datetime.timedelta(-1, 73800) +>>> print(tz.utcoffset(ambiguous, is_dst=False)) +-1 day, 20:30:00 >>> tz.dst(ambiguous, is_dst=False) datetime.timedelta(0) >>> tz.tzname(ambiguous, is_dst=False) @@ -208,10 +208,10 @@ datetime.timedelta(0) If ``is_dst`` is not specified, ambiguous timestamps will raise an ``pytz.exceptions.AmbiguousTimeError`` exception. ->>> tz.utcoffset(normal) -datetime.timedelta(-1, 77400) ->>> tz.dst(normal) -datetime.timedelta(0, 3600) +>>> print(tz.utcoffset(normal)) +-1 day, 21:30:00 +>>> print(tz.dst(normal)) +1:00:00 >>> tz.tzname(normal) 'NDT' |