iOS 应用里面对时区是怎么处理的?存到服务器时会先转化为UTC,还是直接存储中国时区的时间戳?
PHP中文网
PHP中文网 2017-04-18 09:41:35
0
2
792

因为目前我们应用里面存储和解析都用的中国时区的时间戳来存储,目前使用过程中也没有问题,不知道有没有必要转化为UTC再存储,目前会有什么问题?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
Ty80

Pass millisecond timestamp timeIntervalSince1970 * 1000

timeIntervalSince1970
The interval between the date object and 00:00:00 UTC on 1 January 1970.

左手右手慢动作

If you meet users in other time zones, the time will be inaccurate. Previously, our server also stored the timestamp of Dongba District. We found that the time when the client was opened by users from other countries was biased; query, compare, and sort the stored timestamp data. It is more convenient; if you have time zone requirements, it is recommended to switch to UTC as soon as possible

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!