Skip to content

Commit 56e7adf

Browse files
committed
fixup! Simplify datetime with tzinfo example
1 parent a77f55a commit 56e7adf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/library/datetime.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,8 +1350,11 @@ Using datetime with tzinfo:
13501350
... def dst(self, dt):
13511351
... return timedelta(0)
13521352
...
1353-
... def tzname(self,dt):
1354-
... return "Asia/Kabul"
1353+
... def tzname(self, dt):
1354+
... if dt >= self.UTC_MOVE_DATE:
1355+
... return "+04:30"
1356+
... else:
1357+
... return "+04"
13551358
...
13561359
>>> tz1 = KabulTz()
13571360
>>> # Datetime before the change

0 commit comments

Comments
 (0)