Mysql updating timestamp

Thankfully, a couple of My SQL’s internal features came to the rescue.Adding a modified timestamp to a table is the most straight forward.The My SQL TIMESTAMP values are converted from the current time zone to UTC while storing and converted back from UTC to the current time zone when retrieved.

You must insert an extra command into your query, and the simplest way is to separate them with a semicolon.Suppose you stored a TIMESTAMP value, then change the time zone and try to retrieve the value, it returns the different value as you stored earlier.CREATE TABLE `test_table` ( `id` INT( 10 ) NOT NULL, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE = INNODB; I can use CURRENT_TIMESTAMP in only one place in the table.My SQL displays DATETIME values in 'YYYY-MM-DD HH: MM: SS' format.The supported range of My SQL DATETIME type is '1000-01-01 ' to '9999-12-31 '.