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:
Dmitry ShachnevandAdam Turner authored and GitHub committed 2024-11-13 21:53:01 +00:00
1 parent 2dfb0b907d
commit d6da26a7f5
1 file changed
+1 -1
+1 -1
View File
@@ -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