Skip to content

Commit

Permalink
stats: fix compatibility of auto analyze period (#7633)
Browse files Browse the repository at this point in the history
  • Loading branch information
alivxxx authored Sep 6, 2018
1 parent e7afbb2 commit 19e6d45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions statistics/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,12 @@ func parseAutoAnalyzeRatio(ratio string) float64 {
}

func parseAnalyzePeriod(start, end string) (time.Time, time.Time, error) {
if start == "" {
start = variable.DefAutoAnalyzeStartTime
}
if end == "" {
end = variable.DefAutoAnalyzeEndTime
}
s, err := time.ParseInLocation(variable.AnalyzeFullTimeFormat, start, time.UTC)
if err != nil {
return s, s, errors.Trace(err)
Expand Down

0 comments on commit 19e6d45

Please sign in to comment.