Skip to content

Commit d6da26a

Browse files
mitya57AA-Turner
andauthored
Properly strip time zones which are west of UTC (sphinx-doc#13128)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 2dfb0b9 commit d6da26a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_util/test_util_i18n.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_format_date_timezone():
108108
assert fd_gmt == '2016-08-07 05:11:17'
109109
assert fd_gmt == iso_gmt
110110

111-
iso_local = dt.astimezone().isoformat(' ').split('+')[0]
111+
iso_local = dt.astimezone().isoformat(' ')[:19] # strip the timezone
112112
fd_local = i18n.format_date(fmt, date=dt, language='en', local_time=True)
113113
assert fd_local == iso_local
114114
assert fd_local != fd_gmt

0 commit comments

Comments
 (0)