Annotation of wikisrc/tutorials/how_to_set_up_per-user_timezones.mdwn, revision 1.4
1.2 schmonz 1: Besides setting up the global system timezone by symlinking `/etc/localtime`
2: to a file in `/usr/share/zoneinfo`, you can also set a timezone that applies
3: only for one user. This is done by setting the environment variable `TZ`.
5: You can set it in your startup file like this:
8: $ echo 'export TZ=Europe/Amsterdam' >> ~/.profile
11: From this shell all subsequent [date] calls will use the
12: `/usr/share/zoneinfo/Europe/Amsterdam` file for translating the system's UTC
13: time to your local time.
15: To run a single process with a specific timezone, try something like this:
18: $ env TZ=Canada/Eastern xclock -d -strftime "Toronto: %a, %d %b, %H:%M" &
21: This will start an environment with the TZ variable set to Canada/Eastern, and
22: run a digital (-d) xclock with the time formatted as instructed by -strfime,
23: including putting a note about which timezone it belongs to ("Toronto"). This
24: process will detach from the terminal (because of the &), but leave the
25: environment you ran it from with the same timezone it began with. With a setup
26: like this, one can run an xclock (or many xclocks) displaying the localtime of
27: various timezones around the world.
29: ## References
1.4 ! kim 31: * [[!template id=man name="environ" section="7"]]
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb