about summary refs log tree commit diff stats
path: root/lib/templates/template.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/templates/template.go')
-rw-r--r--lib/templates/template.go5
1 files changed, 5 insertions, 0 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,
 }