Browse Source

Add clock time

Andrea Fazzi 1 year ago
parent
commit
0a06eb57c4
2 changed files with 5 additions and 1 deletions
  1. 2 1
      backend/data/screen.tpl.md
  2. 3 0
      backend/main.go

+ 2 - 1
backend/data/screen.tpl.md

@@ -12,7 +12,8 @@ geometry:
 ...
 
 # Buongiorno Aldo!
-Oggi è il {{day}}.{{month}}.{{year}}.
+
+Sono le ore **{{kitchen}}** del **{{day}}.{{month}}.{{year}}**. 
 
 # Situazione meteo
 

+ 3 - 0
backend/main.go

@@ -15,6 +15,9 @@ import (
 )
 
 var funcmap = template.FuncMap{
+	"kitchen": func() string {
+		return time.Now().Format(time.Kitchen)
+	},
 	"day": func() int {
 		_, _, day := time.Now().Date()
 		return day