Kibana:如何将 {{date}} 转换为非 UTC 格式

问题描述 投票:0回答:2

弹性/kibana。我创建了一条提醒规则并尝试在我的电子邮件中使用 {{date}}(或 {{context.date}})。

现在我得到 UTC 格式的日期和时间,如下所示:2023-02-01T08:30:59.069Z

如何将此日期时间转换为本地时区(+2)中的另一种格式:2023-02-01 10:30?

我使用了:

{{dateVar | dateformat="MM/dd/yyyy"}}, {{sysdate}}
和其他方法,但是......

datetime elasticsearch kibana datetime-format mustache
2个回答
0
投票

如果您从 Kibana 观察数据,您可以从以下位置更新时区和时间格式:

堆栈管理=>高级设置


0
投票

我可以格式化日期

{{#FormatDate}} {{{_source.creationDate}}} ;巴西/东部; DD-MM-YYYY hh:mma {{/FormatDate}}

https://www.elastic.co/guide/en/kibana/8.9/rule-action-variables.html

时区参考

使用 TZ 色谱柱

https://en.wikipedia.org/wiki/Time_in_Brazil

© www.soinside.com 2019 - 2024. All rights reserved.