aboutsummaryrefslogtreecommitdiffstats
path: root/models/lfs_lock.go
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2019-08-15 12:53:28 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-08-15 18:53:28 +0800
commitc2c35d169c819439b78c8c2c7f8877e7bf053cd1 (patch)
tree03e5d7379c4fb7a3763d84784f39c5a84a144a19 /models/lfs_lock.go
parenta077c9d551904aec8bebb3bbeadab1361c3611f4 (diff)
downloadgitea-c2c35d169c819439b78c8c2c7f8877e7bf053cd1.tar.gz
gitea-c2c35d169c819439b78c8c2c7f8877e7bf053cd1.zip
lfs/lock: round locked_at timestamp to second (#7872)
* lfs/lock: round locked_at timestamp to second * test returned locked_at values * tests: use time RFC3339
Diffstat (limited to 'models/lfs_lock.go')
-rw-r--r--models/lfs_lock.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/lfs_lock.go b/models/lfs_lock.go
index a27a6f495e..c38686796b 100644
--- a/models/lfs_lock.go
+++ b/models/lfs_lock.go
@@ -56,7 +56,7 @@ func (l *LFSLock) APIFormat() *api.LFSLock {
return &api.LFSLock{
ID: strconv.FormatInt(l.ID, 10),
Path: l.Path,
- LockedAt: l.Created,
+ LockedAt: l.Created.Round(time.Second),
Owner: &api.LFSLockOwner{
Name: l.Owner.DisplayName(),
},