TimeGenerated Column Value to be in UTC+8 by default in Log Analytics Workspace in Azure

76 Views Asked by At

I am currently a beginner in Microsoft Azure and came across a scenario where I need to get the TimeGenerated Value of Query result to be in UTC+8 by default i.e., The moment I click on ‘Run’ for the Query result, it should provide me the TimeGenerated column value in UTC+8 instead of UTC. Is there a way to achieve this? I can see an option below the result of ‘Display Time Zone’ but that is valid only for that current session of Azure Portal.

Please guide me how can I set the UTC+8 timezone by default.

1

There are 1 best solutions below

0
Vivek Vaibhav Shandilya On

Unfortunately, there isn't a built-in way to set a default time zone for the TimeGenerated column, It is a in-built setting set to UTC by default. Date Time value in Kusto is always in UTC as mentioned in the document.

But there are work around to get the local time for the TimeGenerated column.

  1. At the bottom of the logs in log analytics where we can change the time to local time zone or other time zones for viewing purpose. As shown below.

enter image description here

  1. It can be added manually using query: extend Local_time = datetime_utc_to_local(TimeGenerated,'Asia/Kolkata')
    For reference and different time zones check this document.

enter image description here