diff --git a/gocron.go b/gocron.go index 3203d56..def4383 100644 --- a/gocron.go +++ b/gocron.go @@ -136,9 +136,9 @@ func getFunctionNameOfPointer(fn interface{}) string { func parseTime(t string) (hour, min, sec int, err error) { var timeLayout string switch { - case timeWithSeconds.Match([]byte(t)): + case timeWithSeconds.MatchString(t): timeLayout = "15:04:05" - case timeWithoutSeconds.Match([]byte(t)): + case timeWithoutSeconds.MatchString(t): timeLayout = "15:04" default: return 0, 0, 0, ErrUnsupportedTimeFormat