I did this in php to store the lastlogin in a mysql datetime column
date(\'Y-m-d h:i:s\') //which then gave > \'2014-01-04 08:00:56\'
and th
In order to avoid such problems, check the following things.
system time
and system timezone
of both the DB Server and the Application Server are same. dateTime
field in them. Personally, I suggest that you write a common function somewhere in your code, and whenever you need to get the current time, use that function, instead of using the MySQL's NOW()