Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Africa/Casablanca timezone missing #10211

Closed
youssefqarri opened this issue Apr 12, 2020 · 6 comments · Fixed by #10425
Closed

Africa/Casablanca timezone missing #10211

youssefqarri opened this issue Apr 12, 2020 · 6 comments · Fixed by #10425
Labels
comp-datetime date & time & timezone related st-accepted The issue is in our backlog, ready to take

Comments

@youssefqarri
Copy link

Hello,

Putting Africa/Casablanca as a timezone in both config.xml or in queries is not working.

Build : ClickHouse server version 20.3.5.21 (official build).

Regards

@youssefqarri youssefqarri added the bug Confirmed user-visible misbehaviour in official release label Apr 12, 2020
@alexey-milovidov
Copy link
Member

It depends on time zone info in your OS:

$ clickhouse-local --query "SELECT toTimeZone(now(), 'Africa/Casablanca')"
2020-04-12 20:42:32

@alexey-milovidov alexey-milovidov added invalid and removed bug Confirmed user-visible misbehaviour in official release labels Apr 12, 2020
@alexey-milovidov
Copy link
Member

In Linux, time zone info is located in /usr/share/zoneinfo/

@youssefqarri
Copy link
Author

youssefqarri commented Apr 12, 2020

The timezone is available in the OS

[root@xxxx ~]# ls /usr/share/zoneinfo/Africa/
Abidjan Asmara Banjul Bujumbura Conakry Douala Harare Khartoum Libreville Lusaka Mbabane Ndjamena Porto-Novo Tunis
Accra Asmera Bissau Cairo Dakar El_Aaiun Johannesburg Kigali Lome Malabo Mogadishu Niamey Sao_Tome Windhoek
Addis_Ababa Bamako Blantyre Casablanca Dar_es_Salaam Freetown Juba Kinshasa Luanda Maputo Monrovia Nouakchott Timbuktu
Algiers Bangui Brazzaville Ceuta Djibouti Gaborone Kampala Lagos Lubumbashi Maseru Nairobi Ouagadougou Tripoli

FYI, I am using CentOS Linux release 8.1.1911 (Core)

clickhouse-local --query "SELECT toTimeZone(now(), 'Africa/Casablanca')"
Exception: Cannot load time zone Africa/Casablanca
[root@xxxx ~]# timedatectl
               Local time: Sun 2020-04-12 21:05:59 +01
           Universal time: Sun 2020-04-12 20:05:59 UTC
                 RTC time: Sun 2020-04-12 20:05:59
                Time zone: Africa/Casablanca (+01, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

@alexey-milovidov
Copy link
Member

Is it available both on client and server side?
(client may need it for data formatting)

@alexey-milovidov alexey-milovidov added st-need-info We need extra data to continue (waiting for response) and removed invalid labels Apr 12, 2020
@youssefqarri
Copy link
Author

Yes. It is available in both as the client is hosted in the server as the server

@alexey-milovidov alexey-milovidov added st-accepted The issue is in our backlog, ready to take and removed st-need-info We need extra data to continue (waiting for response) labels Apr 12, 2020
@alexey-milovidov
Copy link
Member

Confirmed. I can reproduce it with the following commands:

$ docker run --rm -it --volume /home/milovidov/work/ClickHouse/build:/build centos:8 /build/programs/clickhouse local --query "SELECT toTimeZone(now(), 'Africa/Casablanca')"
Exception: Cannot load time zone Africa/Casablanca
$ docker run --rm -it --volume /home/milovidov/work/ClickHouse/build:/build centos:8 ls -l /usr/share/zoneinfo/Africa/Casablanca
-rw-r--r-- 1 root root 2465 Oct  1  2019 /usr/share/zoneinfo/Africa/Casablanca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-datetime date & time & timezone related st-accepted The issue is in our backlog, ready to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants