mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00:00
time: change float expression to ensure it is an integer
When I increased the number of bits that gccgo uses for untyped floats, the expression 0.52*1e9 was no longer integral. This patch fixes that. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6113043
This commit is contained in:
parent
c17d09a657
commit
426bf36131
1 changed files with 1 additions and 1 deletions
|
@ -805,7 +805,7 @@ var jsonTests = []struct {
|
|||
time Time
|
||||
json string
|
||||
}{
|
||||
{Date(9999, 4, 12, 23, 20, 50, .52*1e9, UTC), `"9999-04-12T23:20:50.52Z"`},
|
||||
{Date(9999, 4, 12, 23, 20, 50, 520*1e6, UTC), `"9999-04-12T23:20:50.52Z"`},
|
||||
{Date(1996, 12, 19, 16, 39, 57, 0, Local), `"1996-12-19T16:39:57-08:00"`},
|
||||
{Date(0, 1, 1, 0, 0, 0, 1, FixedZone("", 1*60)), `"0000-01-01T00:00:00.000000001+00:01"`},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue