The database has a field called the askTime field. Every time data is inserted, the current time will be stored. The format is year, month, day, hour, minute and second. But the problem is I don’t know how to take it out as it is?
Try one: var_dump($date['askTime']) output is null
Try two: echo date("Y-m-d H:i:s",$date['askTime']) output 1970-01- 01 08:00:00, but the time zone has been set in the config file
How does tp3.2 output the formatted date in the database as it is? ?
What you save is the formatted time, then you can retrieve it as a string. Unless you converted it when saving, it is best to take a screenshot to see the data in the database field
1. Screenshot database askTime content
2. If askTime is a string and not a timestamp, don’t use date