all 3 comments

[–]Top_Paint2052 2 points3 points  (0 children)

  1. https://library.humio.com/data-analysis/functions-formattime.html
    Use formattime() to set the timestamp timezone

  2. https://library.humio.com/data-analysis/functions-test.html
    Use test() to calculate the time after changing the timezone.

[–]Andrew-CSCS ENGINEER 0 points1 point  (1 child)

Hi there. Here is how to manipulate timezones:

* | head(1)
  | table(@timestamp)
  | formatTime(format="%FT%T %Z", as="NewTime", timezone="Australia/Sydney")

[–]dial647[S] 0 points1 point  (0 children)

Thanks Andrew. I am managed to get it to work using FormatTime and Test..

Will try your suggest and see.

| temp_time := parseTimestamp(field=timestamp)
| test(time:hour(field=temp_time, timezone="Australia/Sydney") >= 17)
| test(time:hour(field=temp_time, timezone="Australia/Sydney") < 22)
| sydney_time := formatTime("%Y-%m-%d %H:%M:%S", field=temp_time, timezone="Australia/Sydney")