Add method for converting UTC time to a local time zone
It would be great if we could do something like this...
| extend localtimestamp = tolocaltime(timestamp, "Eastern Standard Time")
| summarize Count = count(whatever) by bin(localtimestamp, 24h)
Thanks for this feedback! As Avner Aharoni explained, the language itself will not add a dedicated method, but the Analytics UI does let you select your preferred time zone display, through the settings. Note that queries should always use UTC however.
Jason Wisener commented
The response is ******. Glad other products and frameworks from microsoft doesn't take this attitude.
Philip Dowie commented
We will not implement timezone stuff because we don't believe in making use of libraries which make this very challenging task a piece of cake. Sharpen your pencils guys.
Even when I select local time as the preferred time zone for display in the Analytics UI, when I pin that query to a dashboard, the timestamps in the query results still show up in the dashboard as UTC.
If there was a tolocaltime function, I could convert the timestamp in that way before "project"ing it to the displayed columns.
Tung Dang commented
We have a powerbi output and we would like to translate the EventProcessedUtcTime to local time, which will be used on the PowerBI graphs. Please advise. Thank you!
Hello Jack, sorry for the late reply. My name is Avner Aharoni and I am from the Kusto team who built the platform for Application Insights.
We looked at your ask and we will not implement it because of the difference in the application of the day light savings between different time zones that changes each year, and the huge list of time zones https://www.timeanddate.com/time/zones/
The query editor does have an option to translate datetime columns from UTC to local time I hope that this addresses your scenario.