Both data types: timespamp and datetime can be used to store a date and a time in a MySQL table. So what are the difference between these two and which one should I use in which cases?
The usual use of timestamps in MySQL is in generall to track changes of record (fields like created, last_changed). If you want to store a specific value you should use a datetime field. In MYSQL 5 and above, TIMESTAMP values are converted from the current time zone to UTC for storage, and converted back from UTC to the current time zone for retrieval. (This occurs only for the TIMESTAMP data type, and not for other types such as DATETIME.)
December 2nd, 2012 at 1:35 am
Just as a note, MySQL 5.6 expands the familiar auto-assignment of values on TIMESTAMP columns to DATETIME as well. The new functionality also allows multiple columns defined to record the current time on INSERT or DELETE.
http://mysqlblog.fivefarmers.com/2012/05/29/overlooked-mysql-5-6-new-features-timestamp-and-datetime-improvements/