mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Display ui time with customize time location (#7792)
* display ui time with customize time location * fix lint * rename UILocation to DefaultUILocation * move time related functions to modules/timeutil * fix tests * fix tests * fix build * fix swagger
This commit is contained in:
parent
5a44be627c
commit
85202d4784
77 changed files with 770 additions and 662 deletions
|
@ -3,7 +3,7 @@ package models
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -63,7 +63,7 @@ func TestCreateOrStopIssueStopwatch(t *testing.T) {
|
|||
|
||||
assert.NoError(t, CreateOrStopIssueStopwatch(user3, issue1))
|
||||
sw := AssertExistsAndLoadBean(t, &Stopwatch{UserID: 3, IssueID: 1}).(*Stopwatch)
|
||||
assert.Equal(t, true, sw.CreatedUnix <= util.TimeStampNow())
|
||||
assert.Equal(t, true, sw.CreatedUnix <= timeutil.TimeStampNow())
|
||||
|
||||
assert.NoError(t, CreateOrStopIssueStopwatch(user2, issue2))
|
||||
AssertNotExistsBean(t, &Stopwatch{UserID: 2, IssueID: 2})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue