I would LOVE a TZ function that allows me to shift the timestamp by timezone
maybe timeZone({{.Time}}, "+5") or timeZone({{.Time}}, "AMERICA_NY")
In my tick script, I currently set the message to this:
var message = 'Alert fired @ {{.Time}}'
which yields this alert in slack:
Alert fired @ 2017-12-05 07:19:00 +0000 UTC which would be more helpful if I can set the TZ.
Bonus: A function that formats the timestamp, but that's less important.
Possibly related:
https://github.com/influxdata/kapacitor/issues/1014
If you can give me some pointers, and this feature is desired, I'll happily work on a PR for this.
This would be an awesome addition to K. Here in Tasmania, Australia we have a script that pulls out 10cm depth soil temperature readings at 9:00AM from Influx (important for fertiliser application decisions). Our servers are located in the US so I need to use an local time adjusted 'hour'. Would be great to be able to use TZ('Australia/Hobart') like we can in InfluxQL.
Yes please! Would be great to match working hours during the whole year both when legal time is applied and when not.
Most helpful comment
This would be an awesome addition to K. Here in Tasmania, Australia we have a script that pulls out 10cm depth soil temperature readings at 9:00AM from Influx (important for fertiliser application decisions). Our servers are located in the US so I need to use an local time adjusted 'hour'. Would be great to be able to use TZ('Australia/Hobart') like we can in InfluxQL.