# UTC in DQL

**URL:** <https://community.dynatrace.com/t/utc-in-dql/42649>\
**Category:** DQL\
**Tags:** dql, notebooks\
**Created:** [November 16, 2023, 11:26am UTC](https://community.dynatrace.com/t/utc-in-dql/42649 "2023-11-16T11:26:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eduard\_van\_der1](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@eduard\_van\_der1](https://community.dynatrace.com/u/eduard_van_der1)\
**Post date:** [November 16, 2023, 11:26am UTC](https://community.dynatrace.com/t/utc-in-dql/42649/1 "2023-11-16T11:26:32Z")

</div>

Hi,

For my customer we have the scenario where they are spanning multiple timezones, e.g. GMT+1 and GMT+4:30.

In splunk each user can setup their preferred timezone:&nbsp;[Change user profile settings in Splunk UBA | Splunk Enterprise, Splunk Cloud Platform (last updated 2025-09-02T21:00:18.525Z)](https://docs.splunk.com/Documentation/UBA/5.3.0/User/Profile)

That allows them to have an uniform view of all the data, typically UTC.

In DQL we can do a formatTimestamp to work around it - but I found no way to reliably use formatTimestamp and have it output UTC. In theory we can do it with parsing & then re-formatting it but that is cumbersome to add to every single query. Can we do this with formatTimestamp? (In Java you can also define the zone you want, I don’t see that option here).

---

<div class="post-metadata">

**Author:** ![gbaudart](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Post date:** [November 16, 2023, 11:42am UTC](https://community.dynatrace.com/t/utc-in-dql/42649/2 "2023-11-16T11:42:50Z")

</div>

Hi&nbsp;[@eduard\_van\_der1](https://community.dynatrace.com/user/28481),

I don’t know if this can help you. But for example to position myself in GMT+2, I use this filter in DQL:

```markup
fetch logs,from:toTimestamp("T00:00:00+2")

```

let me know if this suits you 🙂

---

<div class="post-metadata">

**Author:** ![El\_Stevo](https://avatars.discourse-cdn.com/v4/letter/e/ee7513/32.png) [@El\_Stevo](https://community.dynatrace.com/u/El_Stevo)\
**Post date:** [April 12, 2025, 4:11pm UTC](https://community.dynatrace.com/t/utc-in-dql/42649/3 "2025-04-12T16:11:46Z")

</div>

| fieldsAdd utcDateTime = toTimestamp(formatTimestamp(Now(), timezone:“UTC”))
