[MDEV-16423] DST and timestamp comparison Created: 2018-06-07  Updated: 2023-09-24

Status: Confirmed
Project: MariaDB Server
Component/s: Temporal Types, Time zones
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-16422 DST and unix_timestamp(now()) Confirmed
Duplicate
is duplicated by MDEV-16013 During the extra hour upon DST switch... Stalled
Relates
relates to MDEV-22828 Bad results near DST change: UNIX_TIM... Open
relates to MDEV-32148 Inefficient WHERE timestamp_column=da... Closed
relates to MDEV-32152 Wrong results near DST for `WHERE ind... Open

 Description   

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;


Generated at Thu Feb 08 08:28:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.