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
# Drizzle bug #309403 - returning wrong value for FROM_UNIXTIME
8
select FROM_UNIXTIME(24*3600);
13
DROP TABLE IF EXISTS t1;
19
select @a:=FROM_UNIXTIME(1);
20
select unix_timestamp(@a);
23
# Test of some values, including some with daylight saving time
26
CREATE TABLE t1 (ts int);
27
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
28
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
29
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 03:00'));
30
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
31
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
32
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
33
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 02:59:59'));
34
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:00:00'));
35
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:59:59'));
36
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01'));
38
SELECT ts,from_unixtime(ts) FROM t1;
43
# Test of warning for spring time-gap values for system time zone
45
CREATE TABLE t1 (ts timestamp);
46
INSERT INTO t1 (ts) VALUES ('2003-03-30 01:59:59'),
47
('2003-03-30 03:00:00');
48
# Jay believes this is related to bug Drizzle bug #309403 -
49
# returning wrong value for FROM_UNIXTIME
50
# see beginning of this file
51
# ('2003-03-30 02:59:59');
55
# Test for fix for Bug#2523 Check that boundary dates are processed
57
# -- scratch the above, Drizzle allows for longer dates.
59
select unix_timestamp('1970-01-01 00:00:00');
60
select unix_timestamp('1970-01-01 00:00:01');
61
select unix_timestamp('2038-01-19 03:14:07');
62
--error ER_INVALID_UNIX_TIMESTAMP_VALUE # Bad timestamp
63
select unix_timestamp('2038-01-19 03:14:08');