[ 
https://issues.apache.org/jira/browse/SOLR-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109012#comment-13109012
 ] 

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: https://issues.apache.org/jira/browse/SOLR-2785
>             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.
> [http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html]
> ISO 6801 states that timezone modifications should be in the format +00:01, 
> +01:00
> [http://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC]
> 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: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to