[Cosmo] Time Range Query Problem

Cyrus Daboo cyrus+lists.cosmo at daboo.name
Wed Jan 11 07:37:27 PST 2006


Hi Bobby,

--On January 11, 2006 9:53:21 AM -0500 Bobby Rullo <br at osafoundation.org> 
wrote:

> I didn't realize that! That's good to know man. What if there are
> "floating" events  - events without a time zone or UTC? Will those  get
> returned by a time range query?

The -09 draft has some new items for dealing with that. Basically there is 
a default timezone set on a calendar collection and that is used for 
interpreting time-range queries. In addition, the time-range query can also 
include a timezone object - e.g. if the client wants to view the events 
relative to the current 'view' timezone of the client. This is very new and 
a pain - but that's what you have to do to deal with floating times. Note 
that the Cosmo code I wrote does not fully support the new -09 stuff. It 
does know about the difference between floating and non-floating. What 
happens is that the time-range start/end parameters are actually 
duplicated, and the second set adjusted for the passed in timezone, then 
the pair of start/ends are passed to the indexer's comparator. If the 
indexed date is floating, then the floating start/end pair are used for 
comparison, else the non-floating pair is used. What is missing right now 
is extracting a timezone from the query or calendar collection property and 
doing the proper floating time mapping.


-- 
Cyrus Daboo




More information about the Cosmo mailing list