Pipelines now function not working


(Steve Liu) #1

rule "set timestamp"
when
true
then
let new_date = now(“ASIA_HONGKONG”);
set_field(“Datetime”, new_date);
end

Hi I try to add in current datetime in a new field, but the timezone value is not work, it only slow UTC datetime, pls help.

image


(Steve Liu) #2


(Jochen) #3

“ASIA_HONGKONG” is not a valid timezone identifier. See http://joda-time.sourceforge.net/timezones.html for a list of valid timezones.


(Steve Liu) #4

Hi Jo,

I try “Asia/Hong_Kong”, but seem not work, pls help.

Thank You.

Br,
Steve


(Jochen) #5

It’s all working as expected.

Please be aware that all date fields except “timestamp” are displayed with timezone “UTC” (see trailing “Z” in the “Datetime” field).

Also see:
https://github.com/Graylog2/graylog2-server/issues/2689


(Steve Liu) #6

But when I export all logging to CVS, the timestamp is show in UTC? is there any way to fix this?


(Jochen) #7

No, it will always be an ISO 8601 timestamp with timezone UTC.


(system) #8

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.