I am working in a codebase where I have an unfortunate circumstance.
A row is being inserted into the MySQL database where a time
column is being set as null
, but the column is nn
and defaults to NOW()
.
However, I need that value. Without using a select query to pull that time, is there any way I can ensure that a PHP function's output is the exact same value?
Does time() === now()
always? Can timezone settings screw it up? What are the implications of doing the code like this?