<?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 Re: Manipulate datetime in Alert Template in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Manipulate-datetime-in-Alert-Template/m-p/735486#M9419</link>
    <description>&lt;P&gt;For anybody else looking for this, please find working code below, we are GMT+2&lt;/P&gt;&lt;P&gt;You can change the code to fit your needs&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#set ($date = ${latestEvent.eventTime})&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#set ($newDate = ${date.getHours()}+(2))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$date.setHours(${newDate})&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#set( $String = ' ' ) $String.format('%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tSZ', ${date})&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2020 21:30:45 GMT</pubDate>
    <dc:creator>Morelz</dc:creator>
    <dc:date>2020-07-06T21:30:45Z</dc:date>
    <item>
      <title>Manipulate datetime in Alert Template</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Manipulate-datetime-in-Alert-Template/m-p/735485#M9418</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;Does anyone have a way to manipulate the time in an alert template. It'showing the event time in UTC time, not in the customer's time&lt;/P&gt;&lt;P&gt;We have SaaS Controllers which are in Europe however the customer is in a different timezone, however from AppD Support it seems we cannot update the time in the Alert.&lt;/P&gt;&lt;P&gt;This obviously causes confusion when the customer sees the event time is out by a couple of hours&amp;nbsp;&lt;/P&gt;&lt;P&gt;Surely there is a way to add/subtract hours in the template itself?&lt;/P&gt;&lt;P&gt;Any help is appreciated:)&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 09:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Manipulate-datetime-in-Alert-Template/m-p/735485#M9418</guid>
      <dc:creator>Morelz</dc:creator>
      <dc:date>2020-07-05T09:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate datetime in Alert Template</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Manipulate-datetime-in-Alert-Template/m-p/735486#M9419</link>
      <description>&lt;P&gt;For anybody else looking for this, please find working code below, we are GMT+2&lt;/P&gt;&lt;P&gt;You can change the code to fit your needs&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#set ($date = ${latestEvent.eventTime})&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#set ($newDate = ${date.getHours()}+(2))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$date.setHours(${newDate})&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#set( $String = ' ' ) $String.format('%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tSZ', ${date})&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 21:30:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Manipulate-datetime-in-Alert-Template/m-p/735486#M9419</guid>
      <dc:creator>Morelz</dc:creator>
      <dc:date>2020-07-06T21:30:45Z</dc:date>
    </item>
  </channel>
</rss>

