开发者

Are UNIX_TIMESTAMP() and time() the same

开发者 https://www.devze.com 2023-01-24 18:05 出处:网络
Does MySQL UNIX_TIMESTAMP() show the same UNIX timestamp as PHP\'s time() function. Even when the servers are in two different locations?

Does MySQL UNIX_TIMESTAMP() show the same UNIX timestamp as PHP's time() function. Even when the servers are in two different locations?

I've been looking into time and date for hours now and I've confused the hell out o开发者_JAVA百科f my self.

Thanks in advance.


Yes, they are the same.

UNIX timestamps are the number of seconds since midnight of January 1, 1970 in UTC. That is the same time in history no matter where you are, no matter what time zone you're in. The time elapsed since then is the same on every system with an accurate clock.

0

精彩评论

暂无评论...
验证码 换一张
取 消