Closed mingrammer closed 5 years ago
d has been modified, so it does not equal original value. So d.Hours() always returns 0 because the hours part was already subtracted from d.
d
d.Hours()
h := d / time.Hour d -= h * time.Hour
It should use h instead.
h
d
has been modified, so it does not equal original value. Sod.Hours()
always returns 0 because the hours part was already subtracted fromd
.It should use
h
instead.