Skip to content

time: allows signs for year/tz in format string #11128

Closed
@dvyukov

Description

@dvyukov

The following program prints 1994-01-01 00:00:00 -0059 -0059:

package main

import (
    "fmt"
    "time"
)

func main() {
    ret, err := time.Parse("06Z070000", "-6+-1+1-1")
    if err != nil {
        panic(err)
    }
    fmt.Printf("%v\n", ret)
}

Most of the RFCs does not allow that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions