PHP has time()
, MySQL has UNIX_TIMESTAMP()
.
Will these always be equal, on a given machine?
I expect the answer is normally yes, but are there any edge cases?
PHP has time()
, MySQL has UNIX_TIMESTAMP()
.
Will these always be equal, on a given machine?
I expect the answer is normally yes, but are there any edge cases?
They will always be equal on the same machine at the same time.
Do note that it's fairly common for MySQL to be hosted on a second machine, which'll open up the possibility for minor differences (in normal operation, from things like networking latency as the query's returned to the machine making the query) and possibly larger differences (if one/both of the servers have an incorrect time locally).