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
This commit is contained in:
Antoine GIRARD 2019-08-15 12:53:28 +02:00 committed by Lunny Xiao
parent a077c9d551
commit c2c35d169c
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(),
},