Skip to content

time: unexpected change in parseRFC3339 behaviour  #55876

Closed
@synenka

Description

@synenka

What version of Go are you using (go version)?

go1.20

Does this issue reproduce with the latest release?

yes

What did you do?

ts, err := time.Parse(time.RFC3339, "2020-04-14T08:13:26--4:00")

After http://go.dev/cl/425038 change was submitted, "2020-04-14T08:13:26--4:00" date format, which previously could be parsed as RFC3339, fails to be parsed.

Here is a playground example: https://go.dev/play/p/PqyYj1t2T10 shows that this format was accepted with go1.19 but not with the latest dev version.

What did you expect to see?

time.Parse behavior is consistent and follows RFC3339 specification.

What did you see instead?

time.Parse behavior changed unexpectedly after http://go.dev/cl/425038.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions