Skip to content

time: now.Before(time.Unix(math.MaxInt64, 0)) should return true #6210

@gopherbot

Description

@gopherbot

by tim.olsen@10gen.com:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. run program at http://play.golang.org/p/cvez19tXfE

What is the expected output?
"Cool, not the end of the world yet"


What do you see instead?
"uh oh"


Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
darwin (Mac OS X 10.8.4

Which version are you using?  (run 'go version')
go version go1.1.2 darwin/amd64

Please provide any additional information below.
Subtracting 1 or 1000 from MaxInt64 does not change the behavior.  Dividing by 2 does
however suggesting time.Time cannot accommodate the last bit (before the sign) of int64
when converting from unix epoch time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions