Skip to content

Commit

Permalink
fix static check
Browse files Browse the repository at this point in the history
Signed-off-by: tux <[email protected]>
  • Loading branch information
zou2699 authored Dec 8, 2022
1 parent 70e8ae5 commit dc38527
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scalers/cron_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ func (s *cronScaler) IsActive(ctx context.Context) (bool, error) {
if err != nil {
return false, fmt.Errorf("unable to load timezone. Error: %s", err)
}

// Since we are considering the timestamp here and not the exact time, timezone does matter.
currentTime := time.Now().Unix()

nextStartTime, startTimecronErr := getCronTime(location, s.metadata.start)
if startTimecronErr != nil {
return false, fmt.Errorf("error initializing start cron: %s", startTimecronErr)
Expand Down

0 comments on commit dc38527

Please sign in to comment.