From aab3a04d0c4ddbf97d589ba9048a539c6d7186e9 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 25 Jun 2020 23:18:17 +0200 Subject: bug: harmonize how time are used, fix some issues in command special formats This assume that the convertion from time.Time <--> Unix timestamp is lossless which seems to be. --- graphql/models/lazy_bug.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'graphql/models/lazy_bug.go') diff --git a/graphql/models/lazy_bug.go b/graphql/models/lazy_bug.go index 6034e80d..a7840df2 100644 --- a/graphql/models/lazy_bug.go +++ b/graphql/models/lazy_bug.go @@ -81,7 +81,7 @@ func (lb *lazyBug) Id() entity.Id { } func (lb *lazyBug) LastEdit() time.Time { - return time.Unix(lb.excerpt.EditUnixTime, 0) + return lb.excerpt.EditTime() } func (lb *lazyBug) Status() bug.Status { @@ -133,7 +133,7 @@ func (lb *lazyBug) Participants() ([]IdentityWrapper, error) { } func (lb *lazyBug) CreatedAt() time.Time { - return time.Unix(lb.excerpt.CreateUnixTime, 0) + return lb.excerpt.CreateTime() } func (lb *lazyBug) Timeline() ([]bug.TimelineItem, error) { @@ -163,7 +163,7 @@ func NewLoadedBug(snap *bug.Snapshot) *loadedBug { } func (l *loadedBug) LastEdit() time.Time { - return l.Snapshot.LastEditTime() + return l.Snapshot.EditTime() } func (l *loadedBug) Status() bug.Status { @@ -203,7 +203,7 @@ func (l *loadedBug) Participants() ([]IdentityWrapper, error) { } func (l *loadedBug) CreatedAt() time.Time { - return l.Snapshot.CreatedAt + return l.Snapshot.CreateTime } func (l *loadedBug) Timeline() ([]bug.TimelineItem, error) { -- cgit