kubernetes-cronhpa-controller
kubernetes-cronhpa-controller copied to clipboard
why use "11-15-1990" as dataFormat?
When judging whether it is an excluded date, "11-15-1990" is used as the format of the formatting time. The time formatted in this way is weird, and the DAY is not included, so why use formatStr instead of "01-02-2006"?
====== Test ====== code:
func TestFormat(t *testing.T) {
format1, format2 := dateFormat, "01-02-2006"
now := time.Now()
log.Println(" ===> now: " + now.String())
log.Println(" ===> format1: " + now.Format(format1))
log.Println(" ===> format2: " + now.Format(format2))
}
output:
2025/02/17 20:44:11 ===> now: 2025-02-17 20:44:11.3782458 +0800 CST m=+0.028673801
2025/02/17 20:44:11 ===> format1: 22-20-2990
2025/02/17 20:44:11 ===> format2: 02-17-2025
===============