The difference between the output time of the console and the display time of the page is 8 hours.

the angularjs pipeline uses a 24-hour time system, but the console output is different from the page display. How to solve this problem?

lastStopTime | date: "yyyy/MM/dd HH:mm:ss"

Aug.30,2021

the output with a difference of 8 hours uses ISO format time because this is how the ISO format is defined.

const d = new Date();
console.log(d) // 
console.log(d.toISOString()) // 8

refer to DatePipe

the default locale locale is en-US,. Try setting it to zh-Hans.


solved: the console output format is a string format, not a time format;
two solutions:
first: directly intercept the string into the desired format;
second: the database saves the field into a timestamp format

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