Discussion:
Time zone, after reboot comes back to SYSTEM (Debian Bookworm)
(too old to reply)
^Bart
2023-11-06 08:38:06 UTC
Permalink
Hi guys,

I login to MariaDB and I do:

MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'time_zone';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| time_zone | SYSTEM |
+---------------+--------+
1 row in set (0,001 sec)

After it I do:

MariaDB [(none)]> SET GLOBAL time_zone = 'Europe/Rome';
Query OK, 0 rows affected (0,004 sec)

And I have:

MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'time_zone';
+---------------+-------------+
| Variable_name | Value |
+---------------+-------------+
| time_zone | Europe/Rome |
+---------------+-------------+
1 row in set (0,001 sec)

After a reboot, like what I wrote in the subject, the time zone value
comes back to system.

I did from command line:
# timedatectl set-timezone Europe/Rome

I have:

# timedatectl
Local time: lun 2023-11-06 09:31:30 CET
Universal time: lun 2023-11-06 08:31:30 UTC
RTC time: lun 2023-11-06 08:31:30
Time zone: Europe/Rome (CET, +0100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

I inserted the timezone in 50-mysqld_safe.cnf

But after a reboot I have always the value sets on System.

I'll check asap from Knime if the timezone issue is fixed but I think I
did everything to fix it or I should do other things?

Regards.
^Bart
J.O. Aho
2023-11-06 13:23:17 UTC
Permalink
Post by ^Bart
Hi guys,
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'time_zone';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| time_zone     | SYSTEM |
+---------------+--------+
1 row in set (0,001 sec)
MariaDB [(none)]> SET GLOBAL time_zone = 'Europe/Rome';
Query OK, 0 rows affected (0,004 sec)
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'time_zone';
+---------------+-------------+
| Variable_name | Value       |
+---------------+-------------+
| time_zone     | Europe/Rome |
+---------------+-------------+
1 row in set (0,001 sec)
After a reboot, like what I wrote in the subject, the time zone value
comes back to system.
https://mariadb.com/kb/en/time-zones/

[mariadb]
default_time_zone = 'Europe/Rome'

or if you want the system time to also be the same:
sudo ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime
Post by ^Bart
I inserted the timezone in 50-mysqld_safe.cnf
That will apply when running in safe mode.


I do favor UTC as timezone as then you don't have to bother about the
heart attack causing time change twice a year.
--
//Aho
^Bart
2023-11-09 09:55:00 UTC
Permalink
Post by J.O. Aho
https://mariadb.com/kb/en/time-zones/
[mariadb]
default_time_zone = 'Europe/Rome'
I did it in /etc/mysql/mariadb.conf.d/nano 50-server.cnf
Post by J.O. Aho
sudo ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime
Thanks also for this info! :)
Post by J.O. Aho
Post by ^Bart
I inserted the timezone in 50-mysqld_safe.cnf
That will apply when running in safe mode.
You got the point, it is a mistake to modify the file for the safe mode
for what I need.
Post by J.O. Aho
I do favor UTC as timezone as then you don't have to bother about the
heart attack causing time change twice a year.
Also in this case you got the point! :)

Thanks for your reply! :)

^Bart

Loading...