Giter Club home page Giter Club logo

tzc's Issues

Any integration planned with the emacs built-in world-clock

Thanks for a nice package. I was looking for something like that. Btw, I am from Bengaluru as well. I work as a software developer and continuously used worldtimebuddy.com to schedule meeting across timezones.

Are there any integrations/improvement planned with the emacs inbuilt world-clock? There are two things which I can think of:

  • Use world-clock-list variable
  • Improve the wclock buffer to have keys (n,p) to see next hour or previous hour.
  • Allow date/time input using org style (similar) org-time-stamp function

Failure to load tzdata on Android under Termux

The tzc-main-dir customizable var attempts some good guesses for finding tzdata files but there is a gap when it is invoked under Termux on Android. Executing the following script demonstrates the issue with querying system-type alone:

#!/usr/bin/env -S emacs --script

(mapcar
 (lambda (sym)
   (princ (concat
	   (symbol-name sym)
	   ":\t"
	   (let ((symv (symbol-value sym)))
	     (if (stringp symv)
	      symv
	      (symbol-name symv)))
	   "\n")))
 '(system-configuration system-type))

...which, under Termux, prints:

system-configuration:   aarch64-unknown-linux-android
system-type:    gnu/linux

The challenge is that Android does not follow Linux or macOS convention about splitting up timezone info into multiple files; rather, it offers a single concatenated file:

$ declare -p ANDROID_TZDATA_ROOT
declare -x ANDROID_TZDATA_ROOT="/apex/com.android.tzdata"
$ find "$ANDROID_TZDATA_ROOT" -type f -exec ls -sal --full-time '{}' '+'
find: ‘/apex/com.android.tzdata/lost+found’: Permission denied
  4 -rw-r--r-- 1 system system     26 1969-12-31 19:00:00.000000000 -0500 /apex/com.android.tzdata/apex_manifest.pb
236 -rw-r--r-- 1 system system 237600 1969-12-31 19:00:00.000000000 -0500 /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
  4 -rw-r--r-- 1 system system    248 1969-12-31 19:00:00.000000000 -0500 /apex/com.android.tzdata/etc/tz/telephonylookup.xml
  4 -rw-r--r-- 1 system system     17 1969-12-31 19:00:00.000000000 -0500 /apex/com.android.tzdata/etc/tz/tz_version
440 -rw-r--r-- 1 system system 449437 1969-12-31 19:00:00.000000000 -0500 /apex/com.android.tzdata/etc/tz/tzdata
 36 -rw-r--r-- 1 system system  36717 1969-12-31 19:00:00.000000000 -0500 /apex/com.android.tzdata/etc/tz/tzlookup.xml

I'm figuring out what to do with this file organization and format in order to offer an actual fix, but for now I'm just opening this issue to log the discovery.

Converting times before and after summer time changes

The conversion should take into account the date, i.e. convert the time at a given date, not assume "time as of today".

Today is 2024-03-30. Los Angeles already changed to summer time, but in Europe the clock will change tomorrow.

Converting the time:

11:00 Europe/Lisbon

M-x tzc-convert-time-at-mark

Selecting America/Los_Angeles, the result 04:00 is correct.

https://www.timeanddate.com/worldclock/meetingtime.html?day=30&month=3&year=2024&p1=133&p2=137&iv=0

But tomorrow Europe will change clocks to summer time, and for a time next week:

[2024-04-05 Fri 11:00 Europe/Lisbon]

M-x tzc-convert-org-time-stamp-at-mark

[2024-04-05 Fri 04:00 America/Los_Angeles]

Is not correct, the result should be 03:00.

https://www.timeanddate.com/worldclock/meetingtime.html?iso=20240405&p1=133&p2=137

Invalid conversion: tzc-convert-time EDT 23:00 => IST 23:00, which is wrong.

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:

ELISP> (require 'tzc)
tzc
ELISP> (tzc-convert-time "23:00" "EDT" "IST") 
#("23:00 EDT = 23:00 IST" 0 5
  (face tzc-face-time-string)
  6 9
  (face tzc-face-time-zone-label)
  12 17
  (face tzc-face-time-string)
  18 21
  (face tzc-face-time-zone-label))

ELISP> 

Trying EST (Eastern Standard Time) did not work either:

ELISP> (tzc-convert-time "23:00" "EST" "IST") 
#("23:00 EST = 04:00 +1D IST" 0 5
  (face tzc-face-time-string)
  6 9
  (face tzc-face-time-zone-label)
  12 17
  (face tzc-face-time-string)
  17 21
  (face tzc-face-date-string)
  22 25
  (face tzc-face-time-zone-label))

ELISP> 

23:00 EDT is 08:30 IST.

When there is no selection, convert time or timestamp at point

When using the package commands to convert times, it took me a few tries until I realized I have to select the time or timestamp.

It would be a helpful convenience if the conversion commands could work "at-point", I think other packages have trained us to expect that behaviour.

Different time for UK/London and Europe/London

Hi,

I just installed tzc, and while configuring it I realized that the time given for UK/London is different to that given for Europe/London, as you can see below from the tzc-world-clock command:

Canarias         09:13 Thu 12 May 2022 +0100
CET              10:13 Thu 12 May 2022 +0200
UTC              08:13 Thu 12 May 2022 +0000
New_York         04:13 Thu 12 May 2022 -0400
London           08:13 Thu 12 May 2022 +0000
London           09:13 Thu 12 May 2022 +0100
Madrid           10:13 Thu 12 May 2022 +0200

Refresh *tzc-wclock* buffer

When I invoke M-x tzc-convert-current-time-to-favourite-time-zones the *tzc-wclock* buffer appears with the times of my favorite time zones, which is great.

However if I invoke it again at a later time, the buffer remains the
same (it will just popup with the old info).

Can it be refreshed instead?

Thanks!

PS. I love this package - I was thinking about attempting to write
something similar about a year ago, but this is far and away better
than anything I would have come up with! So thank you! (This type of
functionality should be built into emacs core imo ;))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.