• Time zone, after reboot comes back to SYSTEM (Debian Bookworm)

    From ^Bart@21:1/5 to All on Mon Nov 6 09:38:06 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J.O. Aho@21:1/5 to All on Mon Nov 6 14:23:17 2023
    On 06/11/2023 09.38, ^Bart wrote:
    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.

    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


    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ^Bart@21:1/5 to All on Thu Nov 9 10:55:00 2023
    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

    or if you want the system time to also be the same:
    sudo ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime

    Thanks also for this info! :)

    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.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)