On Monday, 20 April 2020 15:04:54 UTC+1, crate...@gmail.com wrote:
>
> According to https://golang.org/pkg/time/#Duration.Round "If m <= 0, 
> Round returns d unchanged". So now I'm really curious, why do the Round() 
> at all?
>

But in this case, it's a time.Time value, so this applies (
https://pkg.go.dev/time?tab=doc#Time.Round):

Round returns the result of rounding t to the nearest multiple of d (since 
> the zero time). The rounding behavior for halfway values is to round up. If 
> d <= 0, Round returns t stripped of any monotonic clock reading but 
> otherwise unchanged. 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3ea03704-60e7-4c82-b18d-9ce288994c78%40googlegroups.com.

Reply via email to