- uses pongo2 template engine and django template syntax is similar
- the start_time in the database is the UTC time, for example:
2017-12-05T02:41:19Z
The - service converts all the key-value pair data into json, and then passes them to the template engine .
-
expect the format of the front end display is
2017-12-05 02:41
- the current template is:
- time = {{StartTime | date: "Y"}
-
error message:
panic: [Error (where: filter:date) | Line 1 Col 22 near "date"] filter input argument must be of type "time.Time"
Replacing date with time in the - template also reports the same error
so, is anyone familiar with template syntax? Can you change StartTime
to time.Time ()
type
if the local time + 8 is solved