[MDEV-17277] Timezone = UTC Created: 2018-09-23 Updated: 2021-04-20 Resolved: 2018-09-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Time zones |
| Affects Version/s: | 10.1.35 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Olaf van der Spek | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian |
||
| Description |
|
1. How does one set timezone to UTC? [mysqld] [ERROR] Fatal error: Illegal or unknown default time zone 'UTC' MariaDB [(none)]> show variables like '%zone%';
|
| Comments |
| Comment by Alice Sherepa [ 2018-09-24 ] | ||||||
|
To use names like "UTC" you have to populate the timezone table, which can be done by using mysql_tzinfo_to_sql (https://mariadb.com/kb/en/library/mysql_tzinfo_to_sql/). | ||||||
| Comment by Olaf van der Spek [ 2018-09-24 ] | ||||||
|
> system_time_zone = CEST How come CEST is set here if names aren't available / supported? > 2. Could this be made the default? ^ | ||||||
| Comment by Olaf van der Spek [ 2018-09-27 ] | ||||||
|
Alice? | ||||||
| Comment by Alice Sherepa [ 2018-09-27 ] | ||||||
|
Named timezones are usable when they exist in your mysql database. In other cases it is 1) SYSTEM(the default, on your machine it is CEST), like
2) offset from UTC, such as +5:00 or -9:00. | ||||||
| Comment by Olaf van der Spek [ 2018-09-27 ] | ||||||
|
How does this deal with summer times? Would it be applying summer time even for dates that are in winter? > Currently, there are no plans to change this behavior. Could you reconsider? | ||||||
| Comment by Alice Sherepa [ 2018-09-27 ] | ||||||
|
UTC does not change with a change of seasons ("universal") | ||||||
| Comment by Olaf van der Spek [ 2018-09-27 ] | ||||||
|
> UTC does not change with a change of seasons ("universal") I know UTC doesn't.. I'm talking about CEST (from system) when named time zones aren't available to MariaDB. > JIRA is a bugtracker, it is not a place to seek help, please use public forums instead. And this is a feature request to change the default to UTC.. | ||||||
| Comment by Olaf van der Spek [ 2021-03-18 ] | ||||||
|
Ping | ||||||
| Comment by Sergei Golubchik [ 2021-03-24 ] | ||||||
|
according to https://mariadb.com/kb/en/time-zones/ there are three ways to specify a time zone:
that is, if you want UTC, you can use --default-time-zone=+0:0 — this doesn't use time zone names | ||||||
| Comment by Olaf van der Spek [ 2021-04-03 ] | ||||||
|
> an offset from UTC, such as +5:00 or -9:00 An offset isn't a time zone of course, so maybe this should be deprecated? > --default-time-zone=+0:0 Could this be made the default? | ||||||
| Comment by Sergei Golubchik [ 2021-04-05 ] | ||||||
|
First, an offset is a valid timezone specification, not only in MariaDB:
See, the last one specifies a fictional timezone called "FOO" with the UTC offset of 10:30 Second, I doubt we can make UTC a default, it'll break applications for majority of our users | ||||||
| Comment by Olaf van der Spek [ 2021-04-05 ] | ||||||
|
> First, an offset is a valid timezone specification, not only in MariaDB: Sure, but any (real) time zone with DST can't be specified with just an offset, can it? > Second, I doubt we can make UTC a default, it'll break applications for majority of our users The majority of users depend on the default time zone being system? Hmm... Could the "default-time-zone=+0:0" setting be included as a comment in the stock conf then? | ||||||
| Comment by Sergei Golubchik [ 2021-04-20 ] | ||||||
|
A real time zone without DST can, but I understand, you mean that DST cannot be specified that way. You're right. Yes, I think it could be. But practically, based on our feedback data, less than 0.2% of users change the default time zone from SYSTEM. So it's likely do more harm (confusion) than good (help). | ||||||
| Comment by Olaf van der Spek [ 2021-04-20 ] | ||||||
|
> But practically, based on our feedback data, less than 0.2% of users change the default time zone from SYSTEM. I've seen code adjusting times from UTC to local before sending it to the DB and from local to UTC after... > So it's likely do more harm (confusion) than good (help). Why would "default-time-zone=+0:0" as a comment be confusing? |