diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-10-02 11:27:29 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-10-02 09:40:02 +0000 |
| commit | 83a2f15fd095d65dd7ae0d58d3dbe628af3b3daa (patch) | |
| tree | 610044293c589bd55db9bf6661da1eeb44a98aeb /dashboard/app/graphs.go | |
| parent | 1b1436f96458d8d3168370f927b997633ea29c9a (diff) | |
dashboard/app: timeNow(c) not time.Now()
Diffstat (limited to 'dashboard/app/graphs.go')
| -rw-r--r-- | dashboard/app/graphs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dashboard/app/graphs.go b/dashboard/app/graphs.go index 742f048ca..501e405da 100644 --- a/dashboard/app/graphs.go +++ b/dashboard/app/graphs.go @@ -219,7 +219,7 @@ func handleHeatmap(c context.Context, w http.ResponseWriter, r *http.Request, f return fmt.Errorf("only day and month are allowed, but received %s instead, %w", periodType, ErrClientBadRequest) } - periods, err := coveragedb.GenNPeriodsTill(12, civil.DateOf(time.Now()), periodType) + periods, err := coveragedb.GenNPeriodsTill(12, civil.DateOf(timeNow(c)), periodType) if err != nil { return fmt.Errorf("%s: %w", err.Error(), ErrClientBadRequest) } @@ -308,7 +308,7 @@ func handleCoverageGraph(c context.Context, w http.ResponseWriter, r *http.Reque if err != nil { return err } - periodEndDates, err := coveragedb.GenNPeriodsTill(12, civil.DateOf(time.Now()), periodType) + periodEndDates, err := coveragedb.GenNPeriodsTill(12, civil.DateOf(timeNow(c)), periodType) if err != nil { return err } |
