Skip to content

md-arif-shaikh/tzc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TZC

GitHub MELPA

Table of Contents

About

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 the time-zone and daylight saving time history for locations near New York City. For more details, see the time-zone rules as described in the Emacs manual here.
  • zoneinfo could also be any string containg +-HHMM. It also works if the timeshift 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 of Asia/Kolkata one can use UTC+0530 or UTC+053 or GM+0530 or GM+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.

Installation

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)

Customization

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")))

How to use it

Convert a time between time zones

To convert a given time from from-zone to to-zone, use the interactive function tzc-convert-time.

Convert a time from one zone to a list of favourite time zones

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.

Convert and replace time at mark

Convert org time stamp

World clock

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.