Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaef6573

Browse files
committed
Using dbtime.Now for timestamps which will be used in db
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent57a0f77 commitaef6573

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎coderd/notifications/notifier.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"golang.org/x/sync/errgroup"
1111
"golang.org/x/xerrors"
1212

13+
"github.com/coder/coder/v2/coderd/database/dbtime"
1314
"github.com/coder/coder/v2/coderd/notifications/dispatch"
1415
"github.com/coder/coder/v2/coderd/notifications/render"
1516
"github.com/coder/coder/v2/coderd/notifications/types"
@@ -291,7 +292,7 @@ func (n *notifier) newSuccessfulDispatch(msg database.AcquireNotificationMessage
291292
returndispatchResult{
292293
notifier:n.id,
293294
msg:msg.ID,
294-
ts:time.Now(),
295+
ts:dbtime.Now(),
295296
}
296297
}
297298

@@ -311,7 +312,7 @@ func (n *notifier) newFailedDispatch(msg database.AcquireNotificationMessagesRow
311312
returndispatchResult{
312313
notifier:n.id,
313314
msg:msg.ID,
314-
ts:time.Now(),
315+
ts:dbtime.Now(),
315316
err:err,
316317
retryable:retryable,
317318
}
@@ -321,7 +322,7 @@ func (n *notifier) newInhibitedDispatch(msg database.AcquireNotificationMessages
321322
returndispatchResult{
322323
notifier:n.id,
323324
msg:msg.ID,
324-
ts:time.Now(),
325+
ts:dbtime.Now(),
325326
retryable:false,
326327
inhibited:true,
327328
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp