On 18-Oct-07, at 11:43 AM, Chris Hostetter wrote:

: This is easy--I always convert dates to UTC. Doubly important since several
: of our servers operate in different timezones.
:
: Less easy is changing Solr's interpretation of NOW in DateMath to be UTC.
: What is the correct way to go about this?

You lost me there ... "Dates" in java have no concept of timezone, they are absolute moments in the space/time continuom. timezones only affect the parsing/formating of dates. "NOW" is whenever Solr parses the string, and when Solr then formats that Date as a string, it formats it in UTC.

Ah, that is good.  So if:

$ date
Thu Oct 18 12:07:42 PDT 2007

Then NOW in Solr will be the absolute date Thu Oct 18 04:07:42 2007 (which is the current time in UTC)?

i'm guessing you are refering to the notion of rounding down the the
nearest "day" (or anything of less granularity) ... this is currently
hardcoded to be done relative UTC -- but as I mention, this is the type of
thing where ideally Solr would have a setting to let you specify which
timezone the rounding should be relative to.

I'm not sure this is desirable. If your user's are all over the world, you'd ideally want to round to _their_ timezone, but I don't see how this is realistic.

thanks,
-Mike

Reply via email to