emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Idea for handling timezones
@ 2021-04-01  7:40 shironeko
  2021-04-02 11:34 ` tomas
  2021-04-02 23:37 ` Tim Cross
  0 siblings, 2 replies; 24+ messages in thread
From: shironeko @ 2021-04-01  7:40 UTC (permalink / raw)
  To: emacs-orgmode

Hi everyone,

I, like many others on this list, have to move between timezones quite
frequently. As I gathered from the archive, it seems the main complexity in
supporting timezones is the difficulty revolving the change of timestamp format.
So I have an idea, suppose we add a new keyword, "TIMEZONE" that can be set at
the start of the file like so

	#+TIMEZONE: America/Toronto

This specifies the timezone of all timestamps in the file. Together with it,
there can be a function called e.g. org-shift-time, that shifts all the
timestamp in the file to another specified timezone and updates the keyword. Of
course, care needs to be taken when dealing with dates without time, e.g. it
should be treated as at time 00:00 when it is alone or as the start of a time
range, and be treated as at time 24:00 when it is the end of a time range.

Then there could be hooks that offer to run the function automatically when it
detects the user's system or emacs is set to a different timezone as in the file
(e.g. when they open the file, or opens the agenda). This will make sure the
timestamps always aligns with their current one (if they wish).

This change would be backwards compatible, and it should do the job well enough.

Regards,
shironeko


^ permalink raw reply	[flat|nested] 24+ messages in thread
* Idea for handling timezones
@ 2021-03-31  2:23 Shironeko
  0 siblings, 0 replies; 24+ messages in thread
From: Shironeko @ 2021-03-31  2:23 UTC (permalink / raw)
  To: emacs-orgmode

Hi everyone,

I, like many others on this list, have to move between timezones quite
frequently. As I gathered from the archive, it seems the main complexity in
supporting timezones is the difficulty revolving the change of timestamp format.
So I have an idea, suppose we add a new keyword, "TIMEZONE" that can be set at
the start of the file like so

	#+TIMEZONE: America/Toronto

This specifies the timezone of all timestamps in the file. Together with it,
there can be a function called e.g. org-shift-time, that shifts all the
timestamp in the file to another specified timezone and updates the keyword. Of
course, care needs to be taken when dealing with dates without time, e.g. it
should be treated as at time 00:00 when it is alone or as the start of a time
range, and be treated as at time 24:00 when it is the end of a time range.

Then there could be hooks that offer to run the function automatically when it
detects the user's system or emacs is set to a different timezone as in the file
(e.g. when they open the file, or opens the agenda). This will make sure the
timestamps always aligns with their current one (if they wish).

This change would be backwards compatible, and it should do the job well enough.

Regards,
shironeko



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-04-23  7:54 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-01  7:40 Idea for handling timezones shironeko
2021-04-02 11:34 ` tomas
2021-04-03  0:36   ` Shironeko
2021-04-03  7:56     ` tomas
2021-04-03  8:03       ` shironeko
2021-04-03  8:30         ` tomas
2021-04-03  9:26           ` Shironeko
2021-04-03 11:23             ` Greg Minshall
2021-04-03 15:00               ` Russell Adams
2021-04-03 18:51                 ` Greg Minshall
2021-04-03 20:06                   ` Samuel Wales
2021-04-03 22:47                   ` Tim Cross
2021-04-04  0:51                     ` Tom Gillespie
2021-04-04 16:06                       ` Maxim Nikulin
2021-04-23  1:45                         ` Shironeko
2021-04-23  7:54                           ` tomas
2021-04-03 12:43             ` tomas
2021-04-03 12:47               ` Shironeko
2021-04-03 13:20                 ` Shironeko
2021-04-02 23:37 ` Tim Cross
2021-04-03  0:31   ` Samuel Wales
2021-04-03  0:43   ` Shironeko
2021-04-03  0:53     ` Samuel Wales
  -- strict thread matches above, loose matches on Subject: below --
2021-03-31  2:23 Shironeko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).