News for hackers. Stuff that matters.
Re:What every programmer should know about time by cdcarter on Sunday July 03, 2011 @11:17PM (#2725251)
I don't want to tell it that though. I just want to enter things at a time, and have them stay at that time.
Re:What every programmer should know about time by matwood on Sunday July 03, 2011 @11:29PM (#2725278)
You have to tell it a time zone or else the calendar app will not know what time you mean (and really, time without a time zone is meaningless). What you are doing is using your current time zone as the default so when you enter appointments from another time zone you're actually entering them incorrectly.

Any calendar app should allow the entry of appointments with time zone.

Re:What every programmer should know about time by stoney on Monday July 04, 2011 @12:13AM (#2725346)
> You have to tell it a time zone or else the calendar app will not know what time you mean

It seems logical to me that whatever time I write in my calendar app is the time that I expect something to happen. I.e. it is the local time at wherever I happen to be. If I put in a meeting at 4pm on 8/7/2011, then I expect an alarm to sound whenever the local time is 4pm on 8/7/2011.

That's how my paper diary works (or used to work when I had one) - if I am planning for a future event where I will be in a different time zone, I simply write down the local time of the event.

Re:What every programmer should know about time by caf on Monday July 04, 2011 @12:53AM (#2725413)
That doesn't sound at all logical to me. The phone conference is scheduled for a particular time, eg 10am in Montreal. The other meeting participants do not care that it is now 10am in Mombasa, where your phone happens to be at the moment - they will not be at the meeting for another 7 hours anyway.

Your other way also allows for the same event to happen twice, at different times, which is entirely unexpected.

Re:What every programmer should know about time by stoney on Monday July 04, 2011 @02:43AM (#2725624)
Yes, very true. Doesn't work very well for events where people are attending from multiple time zones. I was thinking more of events that I attend in person.

But I'll use the paper diary example again - if I was in Mombassa and was due to have a phone conference at 10am Montreal time, I would write "6pm - Phone conference" in my diary (assuming that is indeed the correct local time).

And in your example, yes, it would be easier for me if I could tell my calendar that it is "10am, montreal time, please adjust that to mombassa time". So I guess my ideal solution would be a calendar app that works the way I described unless I specifically override it.

Anyway, I think this proves the point that time is hard.

Re:What every programmer should know about time by hammerdr on Monday July 04, 2011 @08:36PM (#2728289)
Alternatively, we could all just use UTC+0 and never worry about time zones again! :)
Re:What every programmer should know about time by dandelany on Monday July 04, 2011 @02:42AM (#2725619)
Most useful calendar apps these days allow you to share events, or invite others to an event. What happens when you invite someone who lives in another timezone? There's no good way to handle this that doesn't involve taking timezones into consideration.
Re:What every programmer should know about time by chrisbolt on Monday July 04, 2011 @01:07AM (#2725438)
What is supposed to happen when you take a flight at 4:10pm on 8/7/2011 and land before 4:10pm on 8/7/2011 (local time)? Do you get the alarm twice?
Re:What every programmer should know about time by Archaeum on Monday July 04, 2011 @01:25AM (#2725479)
I think that would be the expectation of most non-engineers, assuming they set the new time zone before arriving and if they even considered edge cases like that. It's also how most alarms work, whether mechanical or digital.
Re:What every programmer should know about time by stoney on Monday July 04, 2011 @02:46AM (#2725631)
I think that's pretty hard to do in these post-concord days?

Though if you lived close to a time zone border it could be a problem. There are towns straddling the Queensland-New South Wales border in Australia. There is a one hour time difference between the states for half of the year (NSW does daylight saving, QLD does not). I've always wondered how local businesses deal with that.

Re:What every programmer should know about time by neckbeard on Monday July 04, 2011 @03:21AM (#2725694)
It is incredibly easy to arrive hours before you leave. Just fly East across the dateline (like Aus to North America).

And I've even lost a birthday flying back in the other direction. Great scheduling, that.

Re:What every programmer should know about time by masklinn on Monday July 04, 2011 @03:51AM (#2725757)
> It is incredibly easy to arrive hours before you leave. Just fly East across the dateline (like Aus to North America).

Or use a fast plane going west (Concorde used to take ~3h for London to NYC, and NYC is on UTC-5, so passengers on Concorde would arrive "2h before they left").

Re:What every programmer should know about time by cdcarter on Monday July 04, 2011 @07:04PM (#2728127)
Time without a time zone is not meaningless. I don't need my calendar to be aware of when in the day the other side of the phone call is happening. I just want to enter "Dinner at 8pm" and have dinner stay at 8pm. This is one situation where I do not want my computer to get unnecessarily smarter than me. Just DWIM.
Re:What every programmer should know about time by viraptor on Monday July 04, 2011 @08:03PM (#2728229)
It still depends on where you have the dinner. If you have a dinner at 8pm in UK, you could leave France after 8pm and arrive for your dinner at 8pm again. What would you expect to happen - get the alarm twice?

What if you actually wanted to call someone before their dinner and that's why you put the event in? If that person was in France in this scenario, you'd want to call them before 7pm UK time instead. Calendars can't guess the context - location of the event depends completely on what you put in.

Re:What every programmer should know about time by baddox on Sunday July 03, 2011 @11:22PM (#2725259)
Any calendar app either has to base its time zone on location or ask you to manually choose a zone. How would you propose changing this?
Re:What every programmer should know about time by andrewcooke on Sunday July 03, 2011 @11:30PM (#2725281)
i think what is being suggested is something like storing it as a string and raising the alarm when the string matches the current local time. so it's "time in whatever time zone i am local to when it matches the time".

(which has problems with uniqueness, but does seem like an intuitive "dwim" high level interface).

Re:What every programmer should know about time by invalidOrTaken on Monday July 04, 2011 @01:02AM (#2725426)
In the realm of unrealistic-now-but-maybe-cool-later, if it could access your flight reservations, it could infer where you'll be at the time and base the time zone on that.