Skip to content

Keep the minutes of a four-digit W3C timezone offset - #601

Open
SashaMIT wants to merge 1 commit into
kurtmckee:mainfrom
SashaMIT:fix/w3dtf-hhmm
Open

SashaMIT wants to merge 1 commit into
kurtmckee:mainfrom
SashaMIT:fix/w3dtf-hhmm

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Oct 1, 2026 •

Copy link
Copy Markdown

2003-12-31T10:14:55+0530 came back as 05:14:55 UTC. The same instant written +05:30 is 04:44:55 UTC. The minute slice starts after a colon, so a four-digit offset kept the hours and dropped the tens digit of the minutes.

A four-digit offset is now hours then minutes. +05:30, -08:00, and Z are unchanged. -0530 was 15:14:55 UTC and is now 15:44:55 UTC.

pytest tests/test_date_parsers.py (76 passed). An Atom entry with <updated>2003-12-31T10:14:55+0530</updated> now parses to 04:44:55 UTC, matching +05:30.

+0530 was read as +05:00 because the minute slice assumed a colon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant