fix(manager): update time parsing format in isInTimePeriod function

This commit is contained in:
Chang lue Tsen 2025-09-29 13:11:51 +09:00
parent d6fcff1fee
commit 02f0d711ba

View File

@ -28,8 +28,8 @@ func (m *Manager) GetMultiplier(current time.Time) float32 {
} }
func (m *Manager) isInTimePeriod(current time.Time, start, end string) bool { func (m *Manager) isInTimePeriod(current time.Time, start, end string) bool {
startTime, _ := time.Parse("15:04", start) startTime, _ := time.Parse("15:04.000", start)
endTime, _ := time.Parse("15:04", end) endTime, _ := time.Parse("15:04.000", end)
currentTime := time.Date(0, 1, 1, current.Hour(), current.Minute(), 0, 0, time.UTC) currentTime := time.Date(0, 1, 1, current.Hour(), current.Minute(), 0, 0, time.UTC)
startTimeFormatted := time.Date(0, 1, 1, startTime.Hour(), startTime.Minute(), 0, 0, time.UTC) startTimeFormatted := time.Date(0, 1, 1, startTime.Hour(), startTime.Minute(), 0, 0, time.UTC)