Type conversion in template syntax

  1. uses pongo2 template engine and django template syntax is similar
  2. the start_time in the database is the UTC time, for example: 2017-12-05T02:41:19Z
  3. The
  4. service converts all the key-value pair data into json, and then passes them to the template engine
  5. .
  6. expect the format of the front end display is 2017-12-05 02:41
  7. the current template is:
  8. time = {{StartTime | date: "Y"}
  9. error message:

    panic: [Error (where: filter:date) | Line 1 Col 22 near "date"] filter input     argument must be of type "time.Time"
  10. Replacing date with time in the
  11. 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

Apr.02,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e52514-4492e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e52514-4492e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?