Ah, so I misunderstood the documentation.
Thanks for the answer.
I suspect the behaviour of play.golang.org is due to the fake time as part
of the sandboxing
//Jens
Am Montag, 14. Mai 2018 11:12:07 UTC+2 schrieb Jakob Borg:
>
> Truncate(0) is not supposed to remove the nanoseconds part; it re
Truncate(0) is not supposed to remove the nanoseconds part; it removes the
monotonic time part. It just happens that the nanoseconds are zero on the
"clock" on play:
https://play.golang.org/p/Kdq_SDTi664
To remove the subsecond part use .Truncate(time.Second) (or the corresponding
Round of cou
Hi, here is something I have been puzzled for a few days now.
On my OSX machine rounding/truncating of time.Time values apparently does
not remove the nanoseconds component as documented when calling
Truncate(0)/Round(0).
On play.golang.org it works as expected:
https://play.golang.org/p/NXyh