mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
cmd/ursrv: Replace "2006-01-02" with time.DateOnly (#9157)
This commit replaces "2006-01-02" to time.DateOnly. time.DateOnly is introduced since Go1.20
This commit is contained in:
parent
ea1ea366d2
commit
5eb20580b1
@ -1014,7 +1014,7 @@ func getSummary(db *sql.DB, min int) (summary, error) {
|
||||
ver = ver[:3] + "0" + ver[3:] // now v0.0x
|
||||
}
|
||||
|
||||
s.setCount(day.Format("2006-01-02"), ver, num)
|
||||
s.setCount(day.Format(time.DateOnly), ver, num)
|
||||
}
|
||||
|
||||
s.filter(min)
|
||||
@ -1041,7 +1041,7 @@ func getPerformance(db *sql.DB) ([][]interface{}, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
row := []interface{}{day.Format("2006-01-02"), totFiles, totMiB, float64(int(sha256Perf*10)) / 10, memorySize, memoryUsage}
|
||||
row := []interface{}{day.Format(time.DateOnly), totFiles, totMiB, float64(int(sha256Perf*10)) / 10, memorySize, memoryUsage}
|
||||
res = append(res, row)
|
||||
}
|
||||
|
||||
@ -1071,7 +1071,7 @@ func getBlockStats(db *sql.DB) ([][]interface{}, error) {
|
||||
continue
|
||||
}
|
||||
row := []interface{}{
|
||||
day.Format("2006-01-02"),
|
||||
day.Format(time.DateOnly),
|
||||
reports,
|
||||
pulled / blocksToGb,
|
||||
renamed / blocksToGb,
|
||||
|
Loading…
Reference in New Issue
Block a user