Are UNIX_TIMESTAMP() and time() the same
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.
精彩评论