mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
pass seconds again, can not emit datetime from backend
This commit is contained in:
@@ -6,7 +6,6 @@ package repo
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
@@ -101,7 +100,7 @@ func GetActiveStopwatch(ctx *context.Context) {
|
||||
issue.Link(),
|
||||
issue.Repo.FullName(),
|
||||
issue.Index,
|
||||
time.Unix(time.Now().Unix() - sw.Seconds(), 0).Format(time.RFC3339),
|
||||
sw.Seconds() + 1, // ensure time is never zero in ui
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,5 +109,5 @@ type StopwatchTmplInfo struct {
|
||||
IssueLink string
|
||||
RepoSlug string
|
||||
IssueIndex int64
|
||||
Datetime string
|
||||
Seconds int64
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user