Qual é a maneira recomendada de armazenar o tempo atual usando PHP e MySQL?
Minha abordagem inicial foi:
$current = time(); // save this to column CURRENT_TIME with column type VARCHAR
//retrieve it like this
$retrieved = mysql_query(....) //assume query for getting the stored time value
$time = strtotime($retrieved);
Eu me deparei com as seguintes abordagens:
usargmstrftime
lidar com gmtusarINT
ao invés deVARCHAR
para a colunause a função mysqlCURTIME
ouCURDATE
use oUNIX_TIMESTAMP
função mysqlnenhum dos quais estava usando oDATETIME
ouTIMESTAMP
tipo var do mysql.
Você tem uma abordagem melhor para este?