[
https://issues.apache.org/jira/browse/SOLR-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558236#comment-13558236
]
Uwe Schindler edited comment on SOLR-4325 at 1/20/13 12:34 PM:
---------------------------------------------------------------
In any case, if we fix the evaluator/the test, we should add a separate test
with a well-known (unfortunately the timezone rules change all the time, maybe
define a mock timezone using new Timezone(rules)) timezone and two fixed dates
around the (mock) DST changes in back and forward direction.
I am not sure if this only applies to DIH or also the Solr date math (maybe its
not tested with locales inside Solr Core).
was (Author: thetaphi):
In any case, if we fix the evaluator/the test, we should add a separate
test with a well-known/mock timezone and a 2 fixed dates around the DST changes
in back and forward direction (unfortunately the timezone rules change all the
time, maybe define a mock timezone using new Timezone(rules)).
> DIH DateFormatEvaluator seems to have problems with DST changes -> test
> disabled
> --------------------------------------------------------------------------------
>
> Key: SOLR-4325
> URL: https://issues.apache.org/jira/browse/SOLR-4325
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 4.0, 4.1
> Reporter: Uwe Schindler
> Fix For: 4.2, 5.0
>
>
> Yesterday was DST change in Fidji (clock went one hour backwards, as summer
> time ended and winter time started). This caused
> org.apache.solr.handler.dataimport.TestBuiltInEvaluators.testDateFormatEvaluator
> to fail. The reason is simple: NOW-2DAYS is evaluated without taking time
> zone into account (its substracting 48 hours), but to be correct and go 2
> DAYS back in local wall clock time, it must subtract only 47 hours. If this
> is not intended (we want to go 48 hours back, not 47), the test needs a fix.
> Otherwise the date evaluator must take the timezone into account when
> substracting days (e.g., use correctly localized Calendar instance and use
> the add() method
> ([http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html#add(int,
> int)]).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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]