Skip to content

time: regression in time.Parse from Go 1.11 to 1.12 #32358

@bep

Description

@bep

See https://play.golang.org/p/dADhD0_mYTH

package main

import (
	"log"
	"time"
)

func main() {

	// The date string is on time.RubyDate format
	_, err := time.Parse(time.UnixDate, "Fri Jan 01 03:01:00 +0000 2016")
	if err == nil {
		log.Fatal("no error")
	}
}

The above runs fine on Go 1.11 (time.Parse returns an error), but fails in Go 1.12 and later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions