lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] [Commented] (SOLR-2785) DateField timezone handling
Date Tue, 20 Sep 2011 21:46:08 GMT


Hoss Man commented on SOLR-2785:

the DateMathParser is not about supporting timezones, it's just a syntax that is supported
for modifying dates so clients don't have to do the math themselves (ie in in range queries
you can do "myField:[NOW/HOUR TO NOW/HOUR+1HOUR]" etc...)

the decision to only support canonical UTC in the DateField format is very deliberate because
it removes any ambiguity and concerns about expecatations of parsing/formatting (ie: if a
user indexes doc A using a TZ of "+07:00" and doc B using a TZ of "-04:00" will the expect
searches matching those docs to have those exact values as the stored field in the result?
 if all docs were indexed using the same TZ, will users expect faceting to implicitly use
that TZ?

the point of the canonical format is to force the client(s) to be aware that in the index,
everything is in UTC.

if you are interested in helping to support dealing with other date formats and parsing of
timezones in insides solr -- but at a higher level then the DateField class -- those features
are definitely desirable.  See SOLR-2690 for more discussion

> DateField timezone handling
> ---------------------------
>                 Key: SOLR-2785
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 3.3
>         Environment: Debian Gnu/Linux, OpenJDK Runtime Environment 14.0-b16
>            Reporter: Howard Cox
>            Priority: Minor
>              Labels: datetime, datetimes, schema
> The Solr DateField appears to only be partially ISO 8601 compliant.
> The DateMathParser requires Timezone modifications to be in the format "+nMINUTES", "+xHOURS",
"+yDAYS" etc.
> []
> ISO 6801 states that timezone modifications should be in the format +00:01, +01:00
> []
> It would be useful if Solr DateField could parse both (I presume there's a reason for
+nMINUTE etc somewhere in Java.)

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message