How does Golang automatically convert the received timestamp to time? Gin used

The frames used by

are gin and gorm . Now the front-end request interface is uploaded and is a timestamp. What should be done to automatically convert the received timestamp to time.Time . What comes from the front end is an json data. Parsing is a problem when using ShouldBindJSON .

May.22,2022

customize a type when using TimeStamp to implement the corresponding method: the code is as follows:

  

I am using gin @ v1.4 version, and json supports direct conversion to time.Time type.
however, custom data formats are not supported. That is, only RFC3339 format (that is, "2006-01-02T15:04:05Z07:00" ) is supported.

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-7ad97a-14bc2.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-7ad97a-14bc2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?