The time when node mysql is stored in the database is inconsistent with the time it takes to get to the front end. How to solve this problem?

above:

this is the time in the database
clipboard.png

clipboard.png

sql
clipboard.png

(?)

 

in addition, my mysql uses the mysql database of esayPHP linked by navicat, and the local computer does not have a mysql database. Will this also have an impact?

Apr.01,2021

if the driver you are using is mysql , modify the option parameters when creating a DB connection by adding dateStrings: true


time, but the front end sees a UTC time (with time zone), you can add 8 hours (if it is China), or use moment.js to convert it to your preferred format.


mysqljs document
has a timezone option to set the time zone when configuring the connection.
or configure dateStrings option to true , do not convert to Date and only return strings.

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