mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-25 22:50:22 -05:00
Properly strip time zones which are west of UTC (#13128)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
1 parent
2dfb0b907d
commit
d6da26a7f5
1 file changed
+1
-1
@@ -108,7 +108,7 @@ def test_format_date_timezone():
|
||||
assert fd_gmt == '2016-08-07 05:11:17'
|
||||
assert fd_gmt == iso_gmt
|
||||
|
||||
iso_local = dt.astimezone().isoformat(' ').split('+')[0]
|
||||
iso_local = dt.astimezone().isoformat(' ')[:19] # strip the timezone
|
||||
fd_local = i18n.format_date(fmt, date=dt, language='en', local_time=True)
|
||||
assert fd_local == iso_local
|
||||
assert fd_local != fd_gmt
|
||||
|
||||
Reference in new issue
Block a user