Reputation: 383
I want my results from this query to show with local time not the UTC:
union *
|
order by timestamp desc
How would I go about getting that to show local time? I know it is some variation on dateadd(timestamp - 7h)
but I can't figure out.
Upvotes: 5
Views: 6622
Reputation: 902
There is also now the ability through the UI settings to default all reports to local time, this helps when you have to account for daylight savings.
Upvotes: 5
Reputation: 20067
Since all datetimes are expressed in UTC, it is often useful to convert these into our local timezone. For simply viewing data, we can add a column using datetime math to add or subtract the necessary number of hours. You could refer to this article for more details.
union *
| extend localTimestamp = timestamp - 7h
| order by localTimestamp desc
Upvotes: 9