mirror of
https://github.com/golang/go
synced 2024-11-22 01:44:40 -07: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
@ -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 New Issue
Block a user