My initial approach was:
$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);
I have come across the following approaches:
- use
gmstrftimeto handle gmt - use
INTinstead ofVARCHARfor the column - use the mysql function
CURTIMEorCURDATE - use the
UNIX_TIMESTAMPmysql function
none of which were using the DATETIME or TIMESTAMP mysql var type.
Do you have a better approach for this one?