<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Transform timezone with DQL in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Transform-timezone-with-DQL/m-p/297894#M3285</link>
    <description>&lt;P&gt;Hi team&lt;/P&gt;&lt;P&gt;We have noticed that the dt.system.events are ingested with a different time zone. Is it possible to transform the timezone with DQL here?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="elenaperez_0-1776418218460.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32781iE40B1A5617686891/image-size/medium?v=v2&amp;amp;px=400" role="button" title="elenaperez_0-1776418218460.png" alt="elenaperez_0-1776418218460.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried using bin(timestamp,24h,at:-1h), but with the change of hour, it gets desynchronized.&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 17 Apr 2026 09:30:25 GMT</pubDate>
    <dc:creator>elenaperez</dc:creator>
    <dc:date>2026-04-17T09:30:25Z</dc:date>
    <item>
      <title>Transform timezone with DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Transform-timezone-with-DQL/m-p/297894#M3285</link>
      <description>&lt;P&gt;Hi team&lt;/P&gt;&lt;P&gt;We have noticed that the dt.system.events are ingested with a different time zone. Is it possible to transform the timezone with DQL here?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="elenaperez_0-1776418218460.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32781iE40B1A5617686891/image-size/medium?v=v2&amp;amp;px=400" role="button" title="elenaperez_0-1776418218460.png" alt="elenaperez_0-1776418218460.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried using bin(timestamp,24h,at:-1h), but with the change of hour, it gets desynchronized.&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 09:30:25 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Transform-timezone-with-DQL/m-p/297894#M3285</guid>
      <dc:creator>elenaperez</dc:creator>
      <dc:date>2026-04-17T09:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Transform timezone with DQL</title>
      <link>https://community.dynatrace.com/t5/DQL/Transform-timezone-with-DQL/m-p/297912#M3291</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Yes, it is possible in DQL, but not by using bin(timestamp, 24h, at: ...).&lt;/P&gt;&lt;P&gt;bin(..., at: -1h) behaves like a fixed offset, so it does not adjust for daylight saving time. That’s why it becomes misaligned after the time change.&lt;/P&gt;&lt;P&gt;A better approach is to build the local day using timezone-aware functions, for example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.system.events
| filter event.kind == "BILLING_USAGE_EVENT" AND
    in(
      event.type,
      array(
        "Full-Stack Monitoring",
        "Infrastructure Monitoring",
        "Foundation &amp;amp; Discovery",
        "Mainframe Monitoring"
      )
    )
| dedup event.id
| fieldsAdd billed_units = coalesce(
    toDouble(billed_gibibyte_hours),
    toDouble(billed_host_hours),
    toDouble(billed_msu_hours)
  )
| fieldsAdd unit_price_eur =
    if(event.type == "Infrastructure Monitoring", toDouble(1),
    else: if(event.type == "Foundation &amp;amp; Discovery", toDouble(1),
    else: if(event.type == "Full-Stack Monitoring", toDouble(1),
    else: if(event.type == "Mainframe Monitoring", toDouble(1),
    else: null))))
| fieldsAdd estimated_cost_eur = billed_units * unit_price_eur
| fieldsAdd local_year  = getYear(timestamp, timezone:"Europe/Madrid")
| fieldsAdd local_month = getMonth(timestamp, timezone:"Europe/Madrid")
| fieldsAdd local_daynum = getDayOfMonth(timestamp, timezone:"Europe/Madrid")
| fieldsAdd local_day = timestamp(
    year: local_year,
    month: local_month,
    day: local_daynum,
    hour: 0,
    minute: 0,
    second: 0,
    timezone: "Europe/Madrid"
  )
| summarize `Application and Infrastructure Observability` = sum(estimated_cost_eur),
    by: { event.type, local_day }
| sort local_day asc&lt;/LI-CODE&gt;&lt;P&gt;Then you can aggregate by local_day.&lt;BR /&gt;For display purposes, you can also use:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;formatTimestamp(timestamp, timezone:"Europe/Madrid")&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 983px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32782iABFCBC521C22F1C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 10:49:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Transform-timezone-with-DQL/m-p/297912#M3291</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2026-04-17T10:49:42Z</dc:date>
    </item>
  </channel>
</rss>

