Tel Map


Changing the Timezone in Debian 9 (Stretch)

Since the release of the newest Debian version 9 (Codename “Stretch”) in June 2017, most system administrators using this distribution will upgrade their systems eventually. One of the changes in the new version that first caught my eye, is that you can’t configure the system’s time zone in the way that most Debian tutorials suggest.
While you might consider this to be a minor issue, I believe that a wrongly configured time zone will lead to confusion in log files and web applications.

How older Tutorials suggest to change the time zone

While this has worked in older Debian version, it will not be enough in Stretch, because not the configured /etc/timezone  is used, but also the Symlink /etc/localtime . To make matters worse, the configured  /etc/timezone will be overwritten by the old value after executing dpkg-reconfigure .

How to change the timezone in Debian Stretch

The first command will create a new symlink from the correct time zone data (located inside /usr/share/zoneinfo ) to /etc/localtime , and the the reconfiguration of the tzdata package will adjust the system accordingly, setting the /etc/timezone  file automatically.

3 Replies to “Changing the Timezone in Debian 9 (Stretch)”

  1. Mario B.

    Danke, das hat mit einige Zeit des Suchens erspart. Man bekommt langsam Angst vor jedem Update, jedesmal eine neue Kleinigkeit die nicht geht.

  2. Danke schön. Da kann ich mich meinem Vorschreiber (Mario B.) anschließen. Hat einiges an Suche erspart. Sonst wurde kontinuierlich die kanadische Zeit angezeigt (AV Linux mit Debian 9.8 und XFCE 4 Oberfläche.)

Leave a Reply

Your email address will not be published. Required fields are marked *

This website uses cookies. By continuing to use the website, you agree to the use of cookies. For more information about cookies, please see our privacy policy.