Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time: MarshalBinary and UnmarshalBinary isn't symmetrical #15716

Closed
bep opened this issue May 17, 2016 · 3 comments
Closed

time: MarshalBinary and UnmarshalBinary isn't symmetrical #15716

bep opened this issue May 17, 2016 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bep
Copy link
Contributor

bep commented May 17, 2016

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

package main

import (
    "fmt"
    "time"
)

func main() {
    var t0 time.Time
    b, _ := t0.MarshalBinary()

    var t time.Time
    t.UnmarshalBinary(b)

    fmt.Printf("%#v %#v\n", t0, t)
}

Prints:

time.Time{sec:0, nsec:0, loc:(*time.Location)(nil)} time.Time{sec:0, nsec:0, loc:(*time.Location)(0x1e2100)}

Expected the time instances to be equal.

@bradfitz bradfitz added this to the Go1.8Maybe milestone May 17, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 10, 2016
@gopherbot
Copy link

CL https://golang.org/cl/31144 mentions this issue.

@dolmen
Copy link
Contributor

dolmen commented Feb 24, 2017

This fix is not mentioned in Go 1.8 release notes. :(
Is it the right place to report this issue with the release notes, or should I open another issue?

@bradfitz
Copy link
Contributor

There are hundreds of minor bug fixes not mentioned in the release notes.

But yes, opening a new bug is the way to enact change if you think we accidentally omitted this (likely) and this is user-visible enough to warrant a mention. We don't track closed issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants