aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/comment.go')
-rw-r--r--bug/comment.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/bug/comment.go b/bug/comment.go
index 09cd49bd..8ea4154f 100644
--- a/bug/comment.go
+++ b/bug/comment.go
@@ -1,5 +1,7 @@
package bug
+import "time"
+
type Comment struct {
Author Person
Message string
@@ -8,3 +10,7 @@ type Comment struct {
// Should be used only for human display, never for ordering as we can't rely on it in a distributed system.
Time int64
}
+
+func (c Comment) FormatTime() string {
+ return time.Unix(c.Time, 0).Format(time.RFC822)
+}