Joda offset missing to the time value which is in milliseconds format for Long datatype in ES


(Krishnama Chary Karthik Tangallapally) #1

Hi Team,

Software stack1: ES 6.5.0, Java 11, Linux server in EST zone (E.Virigina), spring-data-elasticsearch 1.2.1.RELEASE
Software stack2: ES 1.7, Java 8, Linux server in EST zone (E.Virigina), spring-data-elasticsearch 3.1.2.RELEASE

I am using save method to injest a doc into elastic search, the java application sends a field (XMLGregorianCalendar dataType in Java application) value as 04:00:00 and with stack2 the value is saved as 32400000 (4x60x60x1000 + 18000000). 18000000 being a joda offset (5 hrs).

Recently I have upgraded my application to Java 11 and using ES 6.5 and when I run the same codebase the value for the above field in the ES is 14400000 (4x60x60x1000). 18000000 is missing in this case.

I don't find any joda offset in the ES 1.7 elasticsearch.yml file. Can someone please help me understand how this joda is being added to the time which is in milliseconds format in 1.7 version of elastic search. And with what changes to ES 6.5 configuration I can achieve this.

Thanks
Karthik


(Alexander Reelsen) #2

please check the mapping of the field in question, if maybe one cluster has a timezone configured in the mapping and one doesnt.

If this is not the case, please share a fully reproducible example.

Thanks!