1drop table if exists t1;
2create table t1 (i int, c varchar(20));
3insert into t1 values
4(unix_timestamp("2004-01-01 00:00:00"), "2004-01-01 00:00:00");
5insert into t1 values
6(unix_timestamp("2004-03-28 01:59:59"), "2004-03-28 01:59:59"),
7(unix_timestamp("2004-03-28 02:30:00"), "2004-03-28 02:30:00"),
8(unix_timestamp("2004-03-28 03:00:00"), "2004-03-28 03:00:00");
9insert into t1 values
10(unix_timestamp('2004-05-01 00:00:00'),'2004-05-01 00:00:00');
11insert into t1 values
12(unix_timestamp('2004-10-31 01:00:00'),'2004-10-31 01:00:00'),
13(unix_timestamp('2004-10-31 02:00:00'),'2004-10-31 02:00:00'),
14(unix_timestamp('2004-10-31 02:59:59'),'2004-10-31 02:59:59'),
15(unix_timestamp('2004-10-31 04:00:00'),'2004-10-31 04:00:00'),
16(unix_timestamp('2004-10-31 02:59:59'),'2004-10-31 02:59:59');
17insert into t1 values
18(unix_timestamp('1981-07-01 03:59:59'),'1981-07-01 03:59:59'),
19(unix_timestamp('1981-07-01 04:00:00'),'1981-07-01 04:00:00');
20insert into t1 values
21(unix_timestamp('2009-01-01 02:59:59'),'2009-01-01 02:59:59'),
22(unix_timestamp('2009-01-01 03:00:00'),'2009-01-01 03:00:00');
23select i, from_unixtime(i), c from t1;
24i	from_unixtime(i)	c
251072904422	2004-01-01 00:00:00	2004-01-01 00:00:00
261080428421	2004-03-28 01:59:59	2004-03-28 01:59:59
271080428422	2004-03-28 03:00:00	2004-03-28 02:30:00
281080428422	2004-03-28 03:00:00	2004-03-28 03:00:00
291083355222	2004-05-01 00:00:00	2004-05-01 00:00:00
301099170022	2004-10-31 01:00:00	2004-10-31 01:00:00
311099177222	2004-10-31 02:00:00	2004-10-31 02:00:00
321099180821	2004-10-31 02:59:59	2004-10-31 02:59:59
331099184422	2004-10-31 04:00:00	2004-10-31 04:00:00
341099180821	2004-10-31 02:59:59	2004-10-31 02:59:59
35362793608	1981-07-01 03:59:59	1981-07-01 03:59:59
36362793610	1981-07-01 04:00:00	1981-07-01 04:00:00
371230768022	2009-01-01 02:59:59	2009-01-01 02:59:59
381230768024	2009-01-01 03:00:00	2009-01-01 03:00:00
39drop table t1;
40create table t1 (ts timestamp);
41insert into t1 values (19730101235900), (20040101235900);
42select * from t1;
43ts
441973-01-01 23:59:00
452004-01-01 23:59:00
46drop table t1;
47SELECT FROM_UNIXTIME(1230768022), FROM_UNIXTIME(1230768023), FROM_UNIXTIME(1230768024);
48FROM_UNIXTIME(1230768022)	FROM_UNIXTIME(1230768023)	FROM_UNIXTIME(1230768024)
492009-01-01 02:59:59	2009-01-01 02:59:59	2009-01-01 03:00:00
50