Skip navigation links

User Comments

Posted by Ben Clewett on June 29 2015 9:57am[Delete] [Edit]

This seems not to be the case on 5.6.24:

CREATE TABLE t1 (a INT, ts TIMESTAMP DEFAULT NOW(), PRIMARY KEY (ts) );
SET time_zone = '+00:00';
SET timestamp = 1230767999;
INSERT INTO t1 (a) VALUES (1);
SET timestamp = 1230768000;
INSERT INTO t1 (a) VALUES (2);
SELECT a, ts, UNIX_TIMESTAMP(ts) FROM t1;

+------+---------------------+--------------------+
| a | ts | UNIX_TIMESTAMP(ts) |
+------+---------------------+--------------------+
| 1 | 2008-12-31 23:59:59 | 1230767999 |
| 2 | 2009-01-01 00:00:00 | 1230768000 |
+------+---------------------+--------------------+