Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-23 Thread e.fraga
On Friday, 20 Mar 2015 at 11:40, Randomcoder wrote:

[...]

 At this point in time I'm using Org-Mode's agenda to view events.
 Should I try to sync them up with my phone and if so what is the recommended
 way to go ?

I use MobileOrg on Android to sync between org and Google's calendar.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-790-gb719c1.dirty



Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-23 Thread e.fraga
On Friday, 20 Mar 2015 at 11:29, Randomcoder wrote:

[...]

 So would your computer find out the timezone and switch it
 automatically ?
 (IIRC Ubuntu does that by default)

No, I would change the time zone manually.


 On Wed, Mar 18, 2015 at 04:33:44PM +, Eric S Fraga wrote:
 org data were local time with a fluid definition of local.

 I'd be interested in knowing a bit more about the fluid definition.

Simply that I would put in the time that would be appropriate for where
I expected to be when the particular event were to take place.

Sometimes it's easier to not let the computers do everything!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-790-gb719c1.dirty



Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-20 Thread Randomcoder
Hi Eric,

I've also seen these threads from the archive of the mailing list
discussing about the very same thing. 
In summary it seems that in 2008 Carsten's opinion on this was
that it would add a lot of complexity and it's a pandora's box
about to be open.

In 2014, Nicolas's reply seems a bit more encouraging.

http://thread.gmane.org/gmane.emacs.orgmode/93082/focus=93082
http://thread.gmane.org/gmane.emacs.orgmode/5145/focus=5145

On Wed, Mar 18, 2015 at 04:33:44PM +, Eric S Fraga wrote:
 There is no specific solution unfortunately.  Having spent a year living
 and working across time zones, I was unable to find a good
 solution.  And, in fact, the problem was compounded by trying to
 synchronise org data with Google's calendar and with MS Outlook.  I
 eventually simply stopped synchronising and relied on my computer
 having the time that was appropriate for where I was at the time. All

So would your computer find out the timezone and switch it automatically ?
(IIRC Ubuntu does that by default)

On Wed, Mar 18, 2015 at 04:33:44PM +, Eric S Fraga wrote:
 org data were local time with a fluid definition of local.

I'd be interested in knowing a bit more about the fluid definition.




Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-20 Thread Randomcoder
On Wed, Mar 18, 2015 at 02:09:31PM -0400, Ken Mankoff wrote:
 I have a solution that works quite well outside of Org. Apple Calendar
 supports timezones plus a floating option.  I use Org for all my
 floating events - local to the computer and me, whatever TZ we're in. I
 haven't found a way to put TZ-specific events into Org.
 
 If scheduling a Skype with someone in NZ, I enter it in iCal at the NZ
 time in the NZ timezone. Org pulls in my iCal events. Then wherever I
 am when that event happens, I get the alert at the correct time. Most
 things are local to me, so I use floating and stay in Org.

I wrote a silly elisp function that does the conversion for me.  Hah,
yeah ! exactly, I use it for the exact same thing, scheduling an interview
with someone on the other side of the planet.

So for example they ask me 

Can you provide us with times when you're available for an interview ?
and I just make a table and let them decide when:

| time Tokyo | time Sofia |
|+|
| 2015-03-20 18:00 | 2015-03-20 Fri 11:00 |
| 2015-03-21 14:00 | 2015-03-21 Sat 07:00 |
| 2015-03-22 14:00 | 2015-03-22 Sun 07:00 |
| 2015-03-23 14:00 | 2015-03-23 Mon 07:00 |
| 2015-03-24 14:00 | 2015-03-24 Tue 07:00 |
#+TBLFM: $1='(concat  (org-tz-conv $2 Asia/Tokyo to) )

You said above you're using iCal (do you mean, Google Calendar or
Apple Calendar?). I'd be interested in setting this up as well, which one
should I be using ?

At this point in time I'm using Org-Mode's agenda to view events.
Should I try to sync them up with my phone and if so what is the recommended
way to go ?



This is the implementation of org-tz-conv:

(defun org-tz-conv (stamp tz way)
  (let* (
 (current-tz-offset (shell-command-to-string date +%z))
 (stamp1(concat (replace-regexp-in-string []  stamp)   
current-tz-offset))
 (date-cmd-p0  TZ=%s date -d \%s\)
 (date-cmd-p1  date --date=\TZ=\\\%s\\\ %s\)
 (date-cmd-p2   +\%F %H:%M\)
 (date-cmd-rendered1  (format date-cmd-p1 tz stamp1 ))
 (date-cmd-from  (concat date-cmd-rendered1 date-cmd-p2))
 (date-cmd-to(concat (format date-cmd-p0 tz stamp1) 
date-cmd-p2))
 
 (shell-result-from (shell-command-to-string date-cmd-from ))
 (shell-result-to   (shell-command-to-string date-cmd-to   ))

 (result-from (replace-regexp-in-string \n  shell-result-from) )
 (result-to   (replace-regexp-in-string \n  shell-result-to  ) )
 )
(message shell-result-from)
(message shell-result-to)
(cond ((string-equal way from) result-from)
  ((string-equal way to  ) result-to  ))
))




Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-20 Thread Ken Mankoff

On 2015-03-20 at 05:40, Randomcoder randomcod...@gmail.com wrote:
 On Wed, Mar 18, 2015 at 02:09:31PM -0400, Ken Mankoff wrote:
 I have a solution that works quite well outside of Org. Apple
 Calendar supports timezones plus a floating option. I use Org for
 all my floating events - local to the computer and me, whatever TZ
 we're in. I haven't found a way to put TZ-specific events into Org.

 You said above you're using iCal (do you mean, Google Calendar or
 Apple Calendar?). I'd be interested in setting this up as well, which
 one should I be using ?

I use Apple. There is integration for Apple - Org, Org - Apple, Google - 
Org, and Org - Google. 

 At this point in time I'm using Org-Mode's agenda to view events.
 Should I try to sync them up with my phone and if so what is the
 recommended way to go ?

Depends on what you want. You could view everything in MobileOrg. Or export to 
a calendar and then view that.

  -k.



[O] [proposal] timezone-aware timestamps enhancement

2015-03-18 Thread Randomcoder
Hi,

Currently, AFAIK when scheduling something in Org-Mode, the timestamp
doesn't have a timezone.

Use-case example: Let's say Carsten Dominik schedules a meeting with
someone, then jumps on a plane and travels to some place that's on a
timezone difference of -/+ 3 hours. He will probably miss the meeting.

I propose one of the following alternatives:

* either all timestamps are considered UTC and they dynamically change
with the timezone of the system where Emacs is running
* timestamps come with timezone so the user can see what time the
meeting was scheduled at.

Thanks for taking the time to read this. I welcome any feedback on this
as I'm interested in how other people are solving this sort of problem.



Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-18 Thread Eric S Fraga
On Wednesday, 18 Mar 2015 at 10:13, Randomcoder wrote:
 Hi,

 Currently, AFAIK when scheduling something in Org-Mode, the timestamp
 doesn't have a timezone.

[...]

 Thanks for taking the time to read this. I welcome any feedback on this
 as I'm interested in how other people are solving this sort of problem.

Hello Ms Randomcoder,

there is no specific solution unfortunately.  Having spent a year living
and working across time zones, I was unable to find a good
solution.  And, in fact, the problem was compounded by trying to
synchronise org data with Google's calendar and with MS Outlook.  I
eventually simply stopped synchronising and relied on my computer
having the time that was appropriate for where I was at the time.  All
org data were local time with a fluid definition of local.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-820-gd92ef9



Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-18 Thread Ken Mankoff

On 2015-03-18 at 12:33, Eric S Fraga e.fr...@ucl.ac.uk wrote:
 On Wednesday, 18 Mar 2015 at 10:13, Randomcoder wrote:
 Currently, AFAIK when scheduling something in Org-Mode, the timestamp
 doesn't have a timezone.

 there is no specific solution unfortunately.  Having spent a year living
 and working across time zones, I was unable to find a good
 solution.

I have a solution that works quite well outside of Org. Apple Calendar supports 
timezones plus a floating option.

I use Org for all my floating events - local to the computer and me, whatever 
TZ we're in. I haven't found a way to put TZ-specific events into Org.

If scheduling a Skype with someone in NZ, I enter it in iCal at the NZ time in 
the NZ timezone. Org pulls in my iCal events. Then wherever I am when that 
event happens, I get the alert at the correct time. Most things are local to 
me, so I use floating and stay in Org.

  -k.