Skip to content

time: Parse unable to parse RFC3339 string in local time.  #9154

@gopherbot

Description

@gopherbot

by jrwren:

What does 'go version' print?

1.3.3

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

http://play.golang.org/p/QbwDBmI2D_

1. time.Parse an RFC3339 without a time offset and no trailing Z

What happened?

panic

What should have happened instead?

a time value created using the local time zone.

Please provide any additional information below.


Section 4.3.2 of ISO8601 says:

The zone designator is empty if use is made of local time in accordance with 4.2.2.2
through 4.2.2.4, it is the UTC designator [Z] if use is made of UTC of day in accordance
with 4.2.4 and it is the difference-component if use is made of local time and the
difference from UTC in accordance with 4.2.5.2.

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