Setting the timezone: Difference between revisions

From Alpine Linux
m (→‎Manual configuration: Use path and pkg templates.)
mNo edit summary
 
Line 5: Line 5:
= Manual configuration=
= Manual configuration=


Timezone data files are provided by te {{Pkg|tzdata}} package. The current timezone is defined in the {{path|/etc/localtime}} file. To change the timezone, make this file a link to another timezone data file. For example:
Timezone data files are provided by the {{Pkg|tzdata}} package. The current timezone is defined in the {{path|/etc/localtime}} file. To change the timezone, make this file a link to another timezone data file. For example:


  apk add {{pkg|tzdata|arch=}}
  apk add {{pkg|tzdata|arch=}}

Latest revision as of 22:20, 12 March 2025

Timezone can easily be configured with the setup-timezone script.

The approach below is only convenient for systems that need frequent timezone changes, potentially while offline.

Manual configuration

Timezone data files are provided by the tzdata package. The current timezone is defined in the /etc/localtime file. To change the timezone, make this file a link to another timezone data file. For example:

apk add tzdata
ln -s /usr/share/zoneinfo/Europe/Brussels /etc/localtime