• Russ Cox's avatar
    time: add Round and Truncate · 00cd6a3b
    Russ Cox authored
    New in Go 1 will be nanosecond precision in the result of time.Now on Linux.
    This will break code that stores time in external formats at microsecond
    precision, reads it back, and expects to get exactly the same time.
    
    Code like that can be fixed by using time.Now().Round(time.Microsecond)
    instead of time.Now() in those contexts.
    
    R=golang-dev, bradfitz, iant, remyoudompheng
    CC=golang-dev
    https://golang.org/cl/6903050
    00cd6a3b
go1.1.html 3.09 KB