gpt4 book ai didi

azure-log-analytics - 使用 'TimeGenerated' 时,将 UTC "summarize by"转换为 Azure 监视器/日志/分析中的本地时间

转载 作者:行者123 更新时间:2023-12-05 01:38:40 24 4
gpt4 key购买 nike

我有这个简单的查询

MyLog
| summarize avg(executionTimeInMS_d) by bin(TimeGenerated, 5min)

我希望摘要采用我本地的时区,而不是 UTC。这不起作用:

MyLog
| summarize avg(executionTimeInMS_d) by bin(TimeGenerated-5, 5min)

这可以做到吗?

最佳答案

datetime 值采用 UTC。

如果您知道时区偏移量(在您运行查询时),您可以将其减去/添加到您的 datetime 值中,如下所述:https://learn.microsoft.com/en-us/azure/kusto/query/datetime-timespan-arithmetic

例如:print now() - 7h

关于azure-log-analytics - 使用 'TimeGenerated' 时,将 UTC "summarize by"转换为 Azure 监视器/日志/分析中的本地时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59393428/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com