1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

lfs/lock: round locked_at timestamp to second (#7872) (#7875)

* lfs/lock: round locked_at timestamp to second

* test returned locked_at values

* tests: use time RFC3339
This commit is contained in:
Antoine GIRARD
2019-08-15 12:53:20 +02:00
committed by Lunny Xiao
parent 68424eddf0
commit 6b84a1d72b
2 changed files with 6 additions and 2 deletions

View File

@@ -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(),
},