Linux - how to set timezone for Europe Poland Warsaw?

6 points
Asked by:

How do I set correct timezone for Europe Poland Warsaw?

Currently have EDT timezone and want to have CET timezone.

1 answer
2 points
Answered by:

This was tested on linux - CentOS.

  • We print currnet date time (EDT timezone)
root@mail:~# date
Tue Mar 24 07:53:25 EDT 2020
  • We set correct timezone Europe Poland Warsaw (CET timezone)
root@mail:~# sudo unlink /etc/localtime
root@mail:~# sudo ln -s /usr/share/zoneinfo/Europe/Warsaw /etc/localtime
root@mail:~# date
Tue Mar 24 12:55:21 CET 2020

EDT – Eastern Daylight Time (Time Zone Abbreviation)
CET – Central European Time (Time Zone Abbreviation)

Difference in hours is 5h

List zone informations

If we want to list all zone info available we use command:

ls /usr/share/zoneinfo/


root@mail:~# ls /usr/share/zoneinfo/
Africa      Egypt      Hongkong           Mexico      ROC
America     Eire       HST                MST         ROK
Antarctica  EST        Iceland            MST7MDT     Singapore
Arctic      EST5EDT    Indian             Navajo      SystemV
Asia        Etc        Iran               NZ          Turkey
Atlantic    Europe        NZ-CHAT     UCT
Australia   Factory    Israel             Pacific     Universal
Brazil      GB         Jamaica            Poland      US
Canada      GB-Eire    Japan              Portugal    UTC
CET         GMT        Kwajalein          posix       WET
Chile       GMT0       leap-seconds.list  posixrules  W-SU
CST6CDT     GMT-0      Libya              PRC
Cuba        GMT+0      localtime          PST8PDT
EET         Greenwich  MET                right       Zulu

List zone informations for Europe

If we want to use Eurpe we can list all countires available, we use command:

ls /usr/share/zoneinfo/Europe/


root@mail:~# ls /usr/share/zoneinfo/Europe/
Amsterdam   Copenhagen   London      Riga        Ulyanovsk
Andorra     Dublin       Luxembourg  Rome        Uzhgorod
Astrakhan   Gibraltar    Madrid      Samara      Vaduz
Athens      Guernsey     Malta       San_Marino  Vatican
Belfast     Helsinki     Mariehamn   Sarajevo    Vienna
Belgrade    Isle_of_Man  Minsk       Saratov     Vilnius
Berlin      Istanbul     Monaco      Simferopol  Volgograd
Bratislava  Jersey       Moscow      Skopje      Warsaw
Brussels    Kaliningrad  Nicosia     Sofia       Zagreb
Bucharest   Kiev         Oslo        Stockholm   Zaporozhye
Budapest    Kirov        Paris       Tallinn     Zurich
Busingen    Lisbon       Podgorica   Tirane
Chisinau    Ljubljana    Prague      Tiraspol

List zone informations for US

The same can be applied to all other timezones and countires eg for US:

root@mail:/# ls /usr/share/zoneinfo/US/
Alaska    Central       Hawaii          Mountain     Samoa
Aleutian  Eastern       Indiana-Starke  Pacific
Arizona   East-Indiana  Michigan        Pacific-New


0 comments Add comment
Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂