You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is behaving as documented. Subtracting one month from "December 31" produces "November 31". Since there is no such date, it is normalized to "December 1". See https://golang.org/pkg/time/#Time.AddDate .
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go 1.8
What operating system and processor architecture are you using (
go env
)?ubuntu kylin 16.04 LTS
What did you do?
`package main
import (
"time"
"fmt"
)
func main() {
}
`
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
2017-11-30 00:00:00 +0000 UTC
11
What did you see instead?
2017-12-01 00:00:00 +0000 UTC
12
The text was updated successfully, but these errors were encountered: