Open pierre-rouleau opened 2 years ago
Hi, thanks for reaching out. tzc
does not support timezone abbreviations like, EST
or EDT
since these are not unambiguous, instead it uses the city and area-based names like America/New_york
for EST
. In the above example, if you use
(tzc-convert-time "23:00" "America/New_york" "Asia/Kolkata")
you will get the correct result. This has the advantage that it takes care of daylight saving.
if you frequently need to convert time between two zones, you may want to set up your favourite time zones following this https://github.com/md-arif-shaikh/tzc#customization and then call tzc-convert-time-to-favourite-time-zones
Ah, thanks, good to know. I wonder if the code could detect the unsupported timezone abbreviations and issue a user-error when those are passed.
Hi,
I just downloaded this package and tried to convert between EDT (Easter Daylight Time) 23:00 to IST (India Standard Time) and the result was that they are equal, which is wrong.
Tested on Emacs 27.1 Here's a IELM session:
Trying EST (Eastern Standard Time) did not work either:
23:00 EDT is 08:30 IST.