aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/templates/template.go5
-rw-r--r--templates/quoted_reply2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/templates/template.go b/lib/templates/template.go
index f2765e8..9df594e 100644
--- a/lib/templates/template.go
+++ b/lib/templates/template.go
@@ -156,11 +156,16 @@ func cmd(cmd, text string) string {
return out.String()
}
+func toLocal(t time.Time) time.Time {
+ return time.Time.In(t, time.Local)
+}
+
var templateFuncs = template.FuncMap{
"quote": quote,
"wrapText": wrapText,
"wrap": wrap,
"dateFormat": time.Time.Format,
+ "toLocal": toLocal,
"exec": cmd,
}
diff --git a/templates/quoted_reply b/templates/quoted_reply
index f22c2f3..64db1b5 100644
--- a/templates/quoted_reply
+++ b/templates/quoted_reply
@@ -1,2 +1,2 @@
-On {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 3:04 PM"}}, {{(index .OriginalFrom 0).Name}} wrote:
+On {{dateFormat (.OriginalDate | toLocal) "Mon Jan 2, 2006 at 3:04 PM PST"}}, {{(index .OriginalFrom 0).Name}} wrote:
{{wrapText .OriginalText 72 | quote }}