çµæãä¿åã§ããªãã£ãð¢
SET sql_mode = STRICT_ALL_TABLES; CREATE TABLE time_leap ( dt datetime, ts timestamp ) ENGINE=InnoDB; INSERT INTO time_leap VALUES ('2012-06-30 23:59:59', '2012-06-30 23:59:59'); -- Query OK, 1 row affected (0.02 sec) INSERT INTO time_leap VALUES ('2012-06-30 23:59:60', '2012-06-30 23:59:60'); -- ERROR 1292 (22007): Incorrect datetime value: '2012-06-30 23:59:60' for column 'dt' at row 1
ããã試ããã¨æã£ãã®ã¯ãtimestamp
åã¯å
é¨è¡¨ç¾ãepochç§ãªã®ã§ãããç§ä¿åããã®ç¡çã ãããã©datetime
åã¯ç§ã®ç²¾åº¦ã«6bitå²ãã¦ãã®ã§[0, 64)
ã®ç¯å²ã®å¤ãä¿åã§ããã ãã®ç²¾åº¦ãæã£ã¦ãã¨æã£ããã§ããã©ãããè¦ããããã¥ã¡ã³ãã«6 bits second (0-59)
ã£ã¦æ¸ãã¦ããã©ããã§ããªãã¼ã·ã§ã³ãã¦ããã§ãããããã£ã¨ã
MySQL 5.6ã§DATETIMEã®å
é¨è¡¨ç¾ã8ãã¤ããã5ãã¤ãã«ãªã£ããã©ããã®5ãã¤ã40ãããã®ä½¿ãåãæ¹ãããããããã«æ·ãè©°ãã¦ç¡é§ãªã使ãåã£ã¦ãã®ã«æåããã®ãã¿ããªã«ãä¼ãããã®ã§ããèªãã§ãã ãã http://t.co/AyyphyP95G
— Ryuta Kamizono (@kamipo) December 6, 2013