Groups | Search | Server Info | Login | Register


Groups > comp.databases.mysql > #7683

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

Path csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "J.O. Aho" <user@example.net>
Newsgroups comp.databases.mysql
Subject Re: Time zone, after reboot comes back to SYSTEM (Debian Bookworm)
Date Mon, 6 Nov 2023 14:23:17 +0100
Lines 50
Message-ID <kqs7m5Fjgu0U1@mid.individual.net> (permalink)
References <uia8le$d8t0$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace individual.net 77sObdGKvHZdL/BDGiAGQQEHzTba/Ujj8UEFdJQkubbc3veB3+
Cancel-Lock sha1:2ppxN/wHiUzYbCfrrsvFf/5sdCg= sha256:4cn71ZdnxPcRe16CCAk3zGzTDu30tGTuQLwyOJJcvlo=
User-Agent Mozilla Thunderbird
Content-Language en-US-large
In-Reply-To <uia8le$d8t0$1@dont-email.me>
Xref csiph.com comp.databases.mysql:7683

Show key headers only | View raw


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

Back to comp.databases.mysql | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Time zone, after reboot comes back to SYSTEM (Debian Bookworm) ^Bart <gabriele1NOSPAM@hotmail.com> - 2023-11-06 09:38 +0100
  Re: Time zone, after reboot comes back to SYSTEM (Debian Bookworm) "J.O. Aho" <user@example.net> - 2023-11-06 14:23 +0100
    Re: Time zone, after reboot comes back to SYSTEM (Debian Bookworm) ^Bart <gabriele1NOSPAM@hotmail.com> - 2023-11-09 10:55 +0100

csiph-web