Application Insights REST API - 日光节省时间问题 [英] Application Insights REST API - Day light savings time issue

查看:78
本文介绍了Application Insights REST API - 日光节省时间问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在使用Application Insights REST API来提取遥测数据。

如何在AppInsights中处理夏令时?
$
我可以在2019年3月10日凌晨2点进行夏令时,在凌晨2点到凌晨3点之间看到数据中的时间戳值。

I am using Application Insights REST API to pull telemetry data.
How is daylight savings handled in AppInsights?
I can see the timestamp values in the data between 2 AM and 3 AM UTC when daylight savings was done at 2 AM on 10th March 2019.

Wnat配置我的应用程序相应地从AppInsights API获取数据。

Wnat to configure my application fetcing data from AppInsights API accordingly.

谢谢,

Hina Agarwal

Hina Agarwal

推荐答案

Hina! 感谢您使用Application Insights。

Hi, Hina!  Thank you for using Application Insights.

Application Insights默认使用UTC,UTC不会因
夏令时
。 这就解释了为什么您会在凌晨2点到凌晨3点之间看到数据。 然后可以将UTC转换为当地时间:

Application Insights uses UTC by default, and UTC does not change for Daylight Saving Time.  This explains why you would see data between 2 AM and 3 AM UTC.  UTC can then be converted into local time:

https:// dev.applicationinsights.io/documentation/Using-the-API/Query

requests
    | where timestamp > ago(30d) and client_City == "Redmond"
    | summarize clients = dcount(client_IP) 
        by tod_UTC=bin(timestamp % 1d, 1h), resultCode
    | extend local_hour = (tod_UTC - 8h) % 24h

 


这篇关于Application Insights REST API - 日光节省时间问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆