fix parse date bug when month digits not equal 2

This commit is contained in:
MaysWind
2021-03-28 17:27:15 +08:00
parent d5d3f51443
commit d77d9f39d2
+1 -1
View File
@@ -95,7 +95,7 @@ func (s *TransactionService) GetTransactionsInMonthByPage(uid int64, year int, m
return nil, errs.ErrPageCountInvalid
}
startTime, err := utils.ParseFromLongDateTime(fmt.Sprintf("%d-%d-01 00:00:00", year, month), utcOffset)
startTime, err := utils.ParseFromLongDateTime(fmt.Sprintf("%d-%02d-01 00:00:00", year, month), utcOffset)
if err != nil {
return nil, errs.ErrSystemError