TIMESTAMP[(M)]

A timestamp. The range is '1970-01-01 00:00:01' UTC to partway through
the year 2037. TIMESTAMP values are stored as the number of seconds
since the epoch ('1970-01-01 00:00:00' UTC). A TIMESTAMP cannot
represent the value '1970-01-01 00:00:00' because that is equivalent to
0 seconds from the epoch and the value 0 is reserved for representing
'0000-00-00 00:00:00', the "zero" TIMESTAMP value.

A TIMESTAMP column is useful for recording the date and time of an
INSERT or UPDATE operation. By default, the first TIMESTAMP column in a
table is automatically set to the date and time of the most recent
operation if you do not assign it a value yourself. You can also set
any TIMESTAMP column to the current date and time by assigning it a
NULL value. Variations on automatic initialization and update
properties are described in
http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html.

In MySQL 4.1, TIMESTAMP is returned as a string with the format
'YYYY-MM-DD HH:MM:SS'. Display widths (used as described in the
following paragraphs) are no longer supported; the display width is
fixed at 19 characters. To obtain the value as a number, you should add
+0 to the timestamp column.

In MySQL 4.0 and earlier, TIMESTAMP values are displayed in
YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD, or YYMMDD format, depending on
whether M is 14 (or missing), 12, 8, or 6, but allows you to assign
values to TIMESTAMP columns using either strings or numbers. The M
argument affects only how a TIMESTAMP column is displayed, not storage.
Its values always are stored using four bytes each. From MySQL 4.0.12,
the --new option can be used to make the server behave as in MySQL 4.1.

Note that TIMESTAMP(M) columns where M is 8 or 14 are reported to be
numbers, whereas other TIMESTAMP(M) columns are reported to be strings.
This is just to ensure that you can reliably dump and restore the table
with these types.

Note: The behavior of TIMESTAMP columns changed considerably in MySQL
4.1. For complete information on the differences with regard to this
data type in MySQL 4.1 and later versions (as opposed to MySQL 4.0 and
earlier versions), be sure to see
http://dev.mysql.com/doc/refman/4.1/en/timestamp-pre-4-1.html, and
http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html.
