Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Morphilines add some minutes in convertTimestamp

avatar
New Contributor

Hi, i have a problem with morphilines and solr, i can send events logs with flume and morphilines to store in solr for later processing but this event log have a time stamp with this format "2017-05-17T15:20:00.848528" in morphilines, i added the convertTimestamp fragment:

 

{
convertTimestamp {
field : fechaError
inputFormats : ["yyyy-MM-dd'T'HH:mm:ss.SSS", "yyyy-MM-dd"]
inputTimezone : America/Los_Angeles
outputFormat : "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
outputTimezone : UTC
}
}



This work correctly for store data in correct format for Solr but this convertion add some minutes (8 - 15) to real date

 

Real date : 2017-05-17T08:46:45.552554
After convertion : 2017-05-17T08:55:57.554Z

 

I using this expression for extract the value:

 

 

%{TIMESTAMP_ISO8601:fechaError}

I try change de inputTimezone and outputTimezone and the inputLocale and outputLocale puting the same value but the result is esqueals or worst

 

I appreciate your help in advance

1 ACCEPTED SOLUTION

avatar
New Contributor

At last I solved my problem, apparently morphilines have a problem with high precision dates, they simply eliminate the accuracy after seconds and worked correctly:

 

{
convertTimestamp {
field : fechaError
inputFormats : ["yyyy-MM-dd'T'HH:mm:ss.SSS", "yyyy-MM-dd"]
inputTimezone : America/Bogota
outputFormat : "yyyy-MM-dd'T'HH:mm:ss'Z'"
outputTimezone : UTC
}
}

View solution in original post

1 REPLY 1

avatar
New Contributor

At last I solved my problem, apparently morphilines have a problem with high precision dates, they simply eliminate the accuracy after seconds and worked correctly:

 

{
convertTimestamp {
field : fechaError
inputFormats : ["yyyy-MM-dd'T'HH:mm:ss.SSS", "yyyy-MM-dd"]
inputTimezone : America/Bogota
outputFormat : "yyyy-MM-dd'T'HH:mm:ss'Z'"
outputTimezone : UTC
}
}