12 Nov 2026
Setting the Timezone in Emacs
Here’s the problem: You are traveling in a different time zone from the Emacs server instance you are accessing remotely via ssh + emacsclient. All clock calculations in that Emacs session are using the local timezone relative to where the server is located. But what you really want is emacsclient to use the current timezone you are in, so things like the mode line clock render accordingly.
To adjust the timezone in an Emacs session, use the command setenv to set the environment variable TZ with a timezone defined in the zoneinfo database. This can be called from Elisp as shown below.
1 | |
The latest v3.1.0 update of Casual adds the command casual-timezone-set-tz that provides a completion interface for selecting a timezone to pass to setenv.
1 | |
Note that setting TZ impacts the Emacs session globally; any other running behavior depending on a clock should be taken into account.
Past Articles
| 9 NOV 2026 |
Announcing BurnishAnnouncing Burnish, an Elisp package that automates the export and viewing of an Org file. read more |
| 3 NOV 2026 |
Beautifying Org HTML ExportTune how your HTML output looks from Org mode export with |
| 1 NOV 2026 |
Announcing mdired, or adding a chainsaw to DiredAnnouncing mdired, an Elisp package that provides commands for running SIMD-style operations on marked Dired items. read more |
| 5 OCT 2026 |
Announcing triode.elAnnouncing triode.el, a remote control interface to the Triode app from Emacs. read more |
| 28 SEP 2026 |
Announcing AquíAnnouncing Aquí, an Elisp package that obtains high-accuracy location updates on macOS using Shortcuts. read more |
| 24 SEP 2026 |
Binding the SPC key in Dired and IBufferHow I put the space bar to work in Dired and IBuffer. YMMV. read more |
| 21 SEP 2026 |
Announcing restlib - a utility library for building Emacs REST clients
|
| 24 AUG 2026 |
Announcing shazam.elAnnouncing an integration between Emacs and the Shazam music recognition service on macOS, |
| 18 AUG 2026 |
Simplifying Setup for CasualCasual v3.0 update is now available on MELPA and NonGNU ELPA with a vastly simplified setup process. read more |
Page 1 / 20 >