Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not respect offset for format (time) UTC[+-]NNNN #158

Open
klondikedragon opened this issue Dec 15, 2023 · 0 comments · May be fixed by #159
Open

Does not respect offset for format (time) UTC[+-]NNNN #158

klondikedragon opened this issue Dec 15, 2023 · 0 comments · May be fixed by #159

Comments

@klondikedragon
Copy link

Currently it will parse Mon, 1 Dec 2008 14:48:22 GMT-07:00 into 2008-12-01 21:48:22 +0000 UTC (giving special treatment to GMT[+-]NNNN as really another way of just specifying the offset [+-]NNNN.

This makes sense, as this syntax is a way of specifying a timezone as an offset from GMT or UTC.

However, it currently does not give the same special treatment to Mon, 1 Dec 2008 14:48:22 UTC-07:00 -- instead it will just treat this as the UTC time zone and ignore the specified offset (this is due to the special parsing rules of how golang time.Parse always recognizes the "UTC" time zone abbreviation).

For consistency and accuracy, it should treat these cases the same and recognize the offset.

A PR will be opened that fixes this behavior, this is documenting the need/enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant