Setting the timezone: Difference between revisions

From Alpine Linux
(Created page with "==Please note: Only for NON uclibc installs== glibc based installs use different timezone setup. # ls /usr/share/zoneinfo (Suppose you want to use Brussels) (First copy the ...")
 
m (Categorized: System Administration)
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Please note: Only for NON uclibc installs==
 
{{Note|Only for NON uclibc installs!!!}}


glibc based installs use different timezone setup.
glibc based installs use different timezone setup.


# ls /usr/share/zoneinfo
apk add tzdata
(Suppose you want to use Brussels)
ls /usr/share/zoneinfo
(First copy the proper zone to localtime)
Suppose you want to use Brussels
# cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime
First copy the proper zone to localtime
(Now specify your timezone)
cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime
# nano -w /etc/timezone
Now specify your timezone
Europe/Brussels
echo "Europe/Brussels" >  /etc/timezone
date
Result: Wed Mar  8 00:46:05 CET 2006
 
You can now remove the other timezones
apk del tzdata
 


# date
[[Category:System Administration]]
Wed Mar  8 00:46:05 CET 2006

Revision as of 02:48, 21 September 2017

Note: Only for NON uclibc installs!!!

glibc based installs use different timezone setup.

apk add tzdata
ls /usr/share/zoneinfo

Suppose you want to use Brussels First copy the proper zone to localtime

cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime

Now specify your timezone

echo "Europe/Brussels" >  /etc/timezone
date

Result: Wed Mar 8 00:46:05 CET 2006

You can now remove the other timezones

apk del tzdata