Closed sivasamyk closed 6 years ago
The below code when run at 4 PM IST prints. See that in second case when the time passed is AM apm string is replaced by aam
apm
aam
/opt/apm/apm-test/logs/apm.log.20180821 /opt/aam/aam-test/logs/aam.log.20180821
p, _ := strftime.New("/opt/apm/apm-test/logs/apm.log.%Y%m%d") now := time.Now() fmt.Println(p.FormatString(now)) fmt.Println(p.FormatString(now.Add(6 * time.Hour * -1)))
Thank you, fixed!
The below code when run at 4 PM IST prints. See that in second case when the time passed is AM
apm
string is replaced byaam