mysql - Regarding the issue of time storage, do you guys use the local time or UTC time when you save the database time?
伊谢尔伦
伊谢尔伦 2017-06-15 09:21:15
0
4
1245

As the title states, there is a question about time storage. When you store the time in the database, do you use the local time or the UTC world time?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(4)
扔个三星炸死你

Save the timestamp, what if you want world time? →_→

世界只因有你

Of course, take the UTC world time in East 8th District

習慣沉默

Of course it’s UTC time

学习ing

Certainly cannot use database time. For example, you click a button on the page to save a piece of data into the database. There may be some reasons for this process. The time you clicked is 12:00, but the time when the data is saved is 12:01. In this case, the data is wrong. It is said above that getting the timestamp is very reliable. When you click, the timestamp will be put into the data. As for when the database saves it, it doesn't matter. Anyway, the corresponding timestamp is saved at 12:00, and it will always be 12:00 whenever you view it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!