tzc
is a small tool for Emacs
to convert any time from one time-zone
to another time-zone
.
- It supports tzdata database, e.g.,
America/New_York
specifies thetime-zone
and daylight saving time history for locations near New York City. For more details, see thetime-zone
rules as described in theEmacs
manual here. zoneinfo
could also be any string containg+-HHMM
. It also works if thetimeshift
is given upto significant places, i. e., without the last digits when it is zero. For example,+-HH
or+-HHM
would work. For example instead ofAsia/Kolkata
one can useUTC+0530
orUTC+053
orGM+0530
orGM+053
and so on.- A list of all available zones in your system (MacOS (
darwin
) or Linux (gnu/linux
)) is presented for autocompletion. So you can pick one easily. - In the unlikely case where a zone is not available in completion, you can add it to the list
tzc-favourite-time-zones
.
tzc
is available in MELPA. See the instructions here on how to install a MELPA package. If you use use-package
then the following would work
(use-package tzc
:ensure t)
You can customize tzc-favourite-time-zones-alist
to set your favourite time-zones
and labels
(setq tzc-favourite-time-zones-alist '(("UTC+0000" "UTC")
("Asia/Kolkata" "Kolkata")
("America/New_York" "New York")
("Europe/London" "London")
("Europe/Berlin" "Berlin")
("Asia/Shanghai" "Shanghai")
("Asia/Tokyo" "Tokyo")))
To convert a given time
from from-zone
to to-zone
, use the interactive function tzc-convert-time
.
You can set a list of favourite time zones using the variable tzc-favourite-time-zones
and then use
the interactive function tzc-convert-time-to-favourite-time-zones
to get the time converted to your
favourite time zones.
tzc-world-clock
is similar to world-clock
but with the extra feature that with n
(next) or p
(“previous”) key it will change the information on the buffer for the next or previous hours. Pressing g
reverts it back to the current time.