Parse_date with 2022-11-16T17:53:11+01:00

Hi,
using graylog 4.3.7 I have to implement a rule to transform the date 2022-11-16T17:53:11+01:00 to millis.
I use the parse_date function

parse_date(to_string($message.“date”), “yyyy-MM-dd’T’HH:mm:ssXXX”, “EN”, “UTC”).millis);

Even if using Java code I have no problems with the date parse, when the event is managed from the rule I have the follow error

Error: In call to function ‘parse_date’ at 7:37 an exception was thrown: Illegal pattern component: XXX

Can somebody help me?
Gianluca

Ok it seems that using

yyyy-MM-dd’T’HH:mm:ssZ format it works fine

Mark it as the solution for future searchers!! :slight_smile:

1 Like