Skip to content

Commit 9f5dddf

Browse files
chore: wrap c.clock.Now in dbtime.Time
1 parent 6b5334e commit 9f5dddf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/metricscache/metricscache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ func (c *Cache) refreshDeploymentStats(ctx context.Context) error {
158158
}
159159
c.deploymentStatsResponse.Store(&codersdk.DeploymentStats{
160160
AggregatedFrom: from,
161-
CollectedAt: c.clock.Now(),
162-
NextUpdateAt: c.clock.Now().Add(c.intervals.DeploymentStats),
161+
CollectedAt: dbtime.Time(c.clock.Now()),
162+
NextUpdateAt: dbtime.Time(c.clock.Now().Add(c.intervals.DeploymentStats)),
163163
Workspaces: codersdk.WorkspaceDeploymentStats{
164164
Pending: workspaceStats.PendingWorkspaces,
165165
Building: workspaceStats.BuildingWorkspaces,

0 commit comments

Comments
 (0)