SETUP-TIMEZONE(8)
π SETUP-TIMEZONE π
okay so bestie, welcome to setup-timezone(8) β section 8 of the System Manager's Manual, aka the girlies who run your box. this little icon is literally gonna tell your whole system what time it is. let's get into it β¨
πΈ NAME πΈ
setup-timezone β set the system timezone. that's it, that's the tweet π
β¨ SYNOPSIS β¨
setup-timezone [-h] [-k | -i] [TIMEZONE]
look at her. so clean. so simple. -k and -i are giving "pick me, choose me" energy because you literally cannot run both at once π
π¦ DESCRIPTION π¦
setup-timezone configures the system timezone, no cap. it installs tzdata, copies or symlinks the selected zoneinfo file, and creates the /etc/localtime symlink. the whole glow-up in one command π
so here's the tea. run it with no options and tzdata gets installed as a temporary package and the zoneinfo gets copied into /etc/zoneinfo/. temp queen. here for a good time not a long time π«Ά
but with -i? tzdata stays installed permanently and /etc/localtime gets symlinked to /usr/share/zoneinfo instead of copied. commitment!! we love a long-term relationship π
TIMEZONE is a path relative to /usr/share/zoneinfo, like America/New_York or UTC. if you hand it over on the command line, it gets validated and configured β iconic, decisive, we stan. if you don't pass one... the script just exits without changes. no notes, no drama, no timezone set π
and if you omit TIMEZONE entirely, plot twist: the script interactively lists timezone areas and prompts you to navigate the timezone tree π³ like a lil choose-your-own-adventure but make it chronometric.
π₯ OPTIONS π₯
-hβ display usage information and exit. the "wait what does this do again" button π§-iβ install thetzdatapackage permanently and symlink/etc/localtimeto/usr/share/zoneinfo/TIMEZONEinstead of copying. full send, permanent residency β¨-kβ keep existing zoneinfo files in/etc/zoneinfo/when copying. without this option,/etc/zoneinfo/is removed before the new file is copied. so like...-kis the "don't clear my cache" flag π use it or lose it bestie
ngl, remember:-kand-iare mutually exclusive β the synopsis literally shows[-k | -i]with the pipe. it's one or the other, pick your fighter π
π§ INTERACTIVE MODE π§
no TIMEZONE argument? okay diva, let's go on a journey π the script lists available top-level timezone areas (e.g. America, Europe) and prompts:
Which timezone are you in? (or '?' or 'none')
you can type in an area name to drill down into its sub-timezones, hit ? to redisplay the list, or none / abort to exit. respect the escape hatch π«Ά
and when you select a directory, it shows its sub-timezones with the prompt:
What sub-timezone of 'AREA' are you in? (or '?')
this continues until a timezone file is selected. drill down, drill down, drill down β it's giving lore deep-dive and honestly? obsessed π
π FILES π
/usr/share/zoneinfo/β IANA timezone database directory. the mothership π/etc/localtimeβ symlink to the configured timezone. the main character π/etc/zoneinfo/β local copy of the zoneinfo file whentzdatais not permanently installed. the backup bestie π
π EXIT STATUS π
0β success. we ate and left no crumbs πnon-zeroβ an error occurred (invalid timezone, install failure). it's giving flop, but like, informative flop π
π SEE ALSO π
tzdata(8), setup-alpine(8) β go read your other faves, they're literally right there π
π AUTHORS π
Natanael Copa <ncopa@alpinelinux.org> and others. thank you for your service, king π«‘β¨
and that's the whole page bestie!! πβ¨ππ¦πΈ
this iconic lil number comes to you from Alpine Linux, dated 2026-06-09 β go set your timezone, mwah π
π¦ where this page comes from
- alpine 3.24: alpine-conf-doc 3.22.0-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms