Forum OpenACS Q&A: Re: timezone usage

Collapse
10: Re: timezone usage (response to 9)
Posted by Tom Jackson on

So far we have been talking about one case: a static date. I assume that the Calendar package and events in general have to deal with recurring activities. This is a problem if an interval is used to calculate future occurrences, because eventually you will bump up against a timezone boundary. At this point intervals loose meaning unless you know the timezone where the event is occurring. I haven't looked at how the events module handles this, does anyone know?

I'm wondering if there is some better way to deal with recurring activities besides using intervals? Humans understand 'every Tuesday at 8 p.m.', but since intervals are fixed length, they have to be adjusted to cross timezones.

So it seems to work with recurring activities, you need both timezone tables, and a way to record the timezone of the activity.

Collapse
11: Re: timezone usage (response to 10)
Posted by Jerry Asher on
I think this is what I was alluding to earlier.  Some events are dependent on the user's local time zone, whatever that might be at the moment, and some are dependent on a fixed geographical time zone.

On a side note, when is a day not even close to 86,400 seconds?

I found a bug in my app last night where it displayed Sunday twice next week.  Very odd.  Until I discovered that for tcl, next Sunday where DST comes into effect is a day with 90,000 seconds.  It was not suff for me to just add 86,400 to the last clock scanned val, I needed to add "1 day" to it.  Presumably there's a day in April with only 82,800 seconds....