Skip to content

time: MST parsing issues #39588

@pjebs

Description

@pjebs

Go 1.14

localTime := time.Now().Local().Format("2006-01-02T15:04:05Z07:00MST")
// localTime = "2020-06-15T13:47:58+10:00Australian Eastern Standard Time"

time.Parse("2006-01-02T15:04:05Z07:00MST", localTime)
// error = parsing time "2020-06-15T13:44:58+10:00Australian Eastern Standard Time" as "2006-01-02T15:04:05Z07:00MST": cannot parse "Australian Eastern Standard Time" as "MST"

https://play.golang.org/p/dfC-Z1frms5

Should the operation above be the inverse and hence return the original value back instead of producing an error?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions