diff options
| -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 } |
