aboutsummaryrefslogtreecommitdiffstats
path: root/graphql
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-06-25 23:18:17 +0200
committerMichael Muré <batolettre@gmail.com>2020-06-25 23:18:17 +0200
commitaab3a04d0c4ddbf97d589ba9048a539c6d7186e9 (patch)
tree5db59215d2c9559c2d33d1a2a2010270a88d669d /graphql
parent1d06244c82b18959878cf199cd8dd500bbc46aa7 (diff)
downloadgit-bug-aab3a04d0c4ddbf97d589ba9048a539c6d7186e9.tar.gz
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.
Diffstat (limited to 'graphql')
-rw-r--r--graphql/models/lazy_bug.go8
1 files changed, 4 insertions, 4 deletions
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) {