set time_zone='Europe/Moscow';
|
create table t1 (a int, d timestamp);
|
set @@timestamp=1067121000;
|
select now();
|
insert into t1 values (1, current_timestamp()), (2, current_timestamp());
|
set @@timestamp=1067121001;
|
update t1 set d= current_timestamp() where a = 2;
|
set @@timestamp=1067122860;
|
select now();
|
insert into t1 values (3, current_timestamp()), (4, current_timestamp());
|
set @@timestamp=1067122861;
|
update t1 set d= current_timestamp() where a = 4;
|
select a,d,now(),unix_timestamp(d),unix_timestamp(now()) from t1;
|
select a,d,now(),unix_timestamp(d),unix_timestamp(now()) from t1 where d > current_timestamp();
|
drop table t1;
|