2 # Test of SYSTEM time zone handling ( for my_system_gmt_sec()).
3 # This script must be run with TZ=MET
5 -- require r/have_met_timezone.require
7 select FROM_UNIXTIME(24*3600);
12 DROP TABLE IF EXISTS t1;
15 # The following is because of daylight saving time
16 --replace_result MEST MET
17 show variables like "system_time_zone";
22 select @a:=FROM_UNIXTIME(1);
23 select unix_timestamp(@a);
26 # Test of some values, including some with daylight saving time
29 CREATE TABLE t1 (ts int);
30 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
31 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
32 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 03:00'));
33 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
34 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
35 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
36 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 02:59:59'));
37 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:00:00'));
38 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:59:59'));
39 INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01'));
41 SELECT ts,from_unixtime(ts) FROM t1;
46 # Test of warning for spring time-gap values for system time zone
48 CREATE TABLE t1 (ts timestamp);
49 INSERT INTO t1 (ts) VALUES ('2003-03-30 01:59:59'),
50 ('2003-03-30 02:59:59'),
51 ('2003-03-30 03:00:00');
55 # Test for fix for Bug#2523 Check that boundary dates are processed
58 select unix_timestamp('1970-01-01 01:00:00'),
59 unix_timestamp('1970-01-01 01:00:01'),
60 unix_timestamp('2038-01-19 04:14:07'),
61 unix_timestamp('2038-01-19 04:14:08');