MDEV-35088 main.timezone failing - MEST vs CET time zone difference

Reported in Debian bug #1084293, from the tzdata changelog:

  * Upstream obsoleted the System V names CET, CST6CDT, EET, EST*, HST, MET,
    MST*, PST8PDT, and WET. They are symlinks now. Move those zones to
    tzdata-legacy and update /etc/localtime on package update to the new names.
    Please use Etc/GMT* in case you want to avoid DST changes.

As such the timezone output started to output CET (or CEST) as the
current timezone. Due to the way the test was written, its only
possible to hit this error when running mtr from a package. The
internals of MTR fix the timezone so this will never be hit in a build.

As such, added Europe/Budapest as the Central Europe Standard Time
(per sql/win_tzname_data.h and its derived unicode.org source) as timezone,
hard fixed by timezone.opt file so it will always run. The
have_cet_timezone is there to check the zonedata is installed
(was absent on buildbot Ubuntu 22.04 and Windows).

As replace result to the CET output and treat MET/MEST as the
same while its on its way out.

Thanks Santiago Vila for the bug report and Otto for forwarding it.
This commit is contained in:
Daniel Black 2024-11-08 17:11:41 +11:00
parent ce3d0cd5b4
commit cad881ab10
4 changed files with 5 additions and 4 deletions

View file

@ -0,0 +1 @@
--timezone=Europe/Budapest

View file

@ -1,7 +1,7 @@
DROP TABLE IF EXISTS t1;
show variables like "system_time_zone";
Variable_name Value
system_time_zone MET
system_time_zone CET
select @a:=FROM_UNIXTIME(1);
@a:=FROM_UNIXTIME(1)
1970-01-01 01:00:01

View file

@ -1,8 +1,8 @@
#
# Test of SYSTEM time zone handling ( for my_system_gmt_sec()).
# This script must be run with TZ=MET
# This script must have zonedata for CET
-- require include/have_cet_timezone.require
-- require include/have_met_timezone.require
disable_query_log;
select FROM_UNIXTIME(24*3600);
enable_query_log;
@ -13,7 +13,7 @@ DROP TABLE IF EXISTS t1;
--enable_warnings
# The following is because of daylight saving time
--replace_result MEST MET
--replace_result MEST CET MET CET
show variables like "system_time_zone";
#