time: Parse of am/pm should be forgiving of spaces and case #51320
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
import (
"testing"
"time"
)
func TestParse(t *testing.T) {
var tm time.Time
var err error
}
What did you expect to see?
Tests pass
What did you see instead?
=== RUN TestParse
parse_test.go:14: parsing time "5:23 PM" as "3:04PM": cannot parse "M" as "PM"
parse_test.go:17: hour does not match
parse_test.go:22: parsing time "5:23PM" as "3:04pm": cannot parse "" as "pm"
parse_test.go:25: hour does not match
--- FAIL: TestParse (0.00s)
The text was updated successfully, but these errors were encountered: