summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2020-10-19 13:59:38 +0200
committerHubert Hirtz <hubert@hirtz.pm>2020-10-19 13:59:38 +0200
commit7cea5aee078803e7b3a0cd2122d1ba2309881c58 (patch)
tree8deffd3aadec90b2c442b1d501c1f95655d7c013
parentDisplay strike-through text (diff)
Fix duplicate timestamps
Caused by difference between timezones (lines initialized with time.Now() are set to local timezone while lines initialized with message time tag are set to UTC). Closes #43
Diffstat (limited to '')
-rw-r--r--ui/buffers.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/buffers.go b/ui/buffers.go
index 129a10d..4f382dd 100644
--- a/ui/buffers.go
+++ b/ui/buffers.go
@@ -315,6 +315,7 @@ func (bs *BufferList) AddLine(title string, highlight bool, line Line) {
b := &bs.list[idx]
n := len(b.lines)
line.Body = strings.TrimRight(line.Body, "\t ")
+ line.At = line.At.UTC()
if line.Mergeable && n != 0 && b.lines[n-1].Mergeable {
l := &b.lines[n-1]