Github user dsmiley commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/428#discussion_r207049175
  
    --- Diff: 
solr/core/src/java/org/apache/solr/update/processor/ParseDateFieldUpdateProcessorFactory.java
 ---
    @@ -144,15 +153,19 @@ public void init(NamedList args) {
         }
     
         Object defaultTimeZoneParam = args.remove(DEFAULT_TIME_ZONE_PARAM);
    -    DateTimeZone defaultTimeZone = DateTimeZone.UTC;
    +    ZoneId defaultTimeZone = ZoneOffset.UTC;
         if (null != defaultTimeZoneParam) {
    -      defaultTimeZone = 
DateTimeZone.forID(defaultTimeZoneParam.toString());
    +      TimeZone.getTimeZone(defaultTimeZoneParam.toString());
    +      defaultTimeZone = ZoneId.of(defaultTimeZoneParam.toString());
         }
     
         Collection<String> formatsParam = args.removeConfigArgs(FORMATS_PARAM);
         if (null != formatsParam) {
           for (String value : formatsParam) {
    -        formats.put(value, 
DateTimeFormat.forPattern(value).withZone(defaultTimeZone).withLocale(locale));
    +        DateTimeFormatter formatter = new 
DateTimeFormatterBuilder().parseCaseInsensitive()
    --- End diff --
    
    it'd be nice if case insensitivity & leniency could somehow be configured 
in the pattern (which it can't AFAIK), or failing that then new options to set 
these things on all patterns conditionally (similar to how we have a default 
time zone).  But that need not be addressed now; it can be added in SOLR-12591. 
 Did you attempt feature parity here (thus presumably Joda was by default case 
insensitive, and leniency=false)?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to