Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
12-06-2021 01:02 AM
Hello everyone
I faced a problem with variable on Email templates. When trigger text with ${action.triggerTime} sent to Email address, I see only UTC time, but for my notify's need to GMT+3. Im tried anything, but it not successed.
Maybee someone knows how to use this variable with non-UTC time?
Solved! Go to Solution.
12-06-2021
01:32 AM
- last edited on
09-30-2022
02:01 PM
by
Claudia.Landiva
Hi Ilya
You can use the following, as AppD uses Apache Velocity, below is an example of GMT+2 where we use eventtime, but you can use it for any datetime in AppD. Please adjust the +2, to +3 for your use timezone and the Date Variable.
#set ($date = ${latestEvent.eventTime})#set ($newDate = ${date.getHours()}+(2))$date.setHours(${newDate})#set( $String = ' ' ) $String.format('%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tSZ', ${date})
edited for formatting, C. Landivar, Community Manager & Editor
03-04-2022
08:24 AM
- last edited on
09-30-2022
01:58 PM
by
Claudia.Landiva
Hi @Mario.Morelli,
Can you help me with +5:30 for IST time?
edited for formatting, C. Landivar, Community Manager & Editor
03-04-2022
10:49 PM
- last edited on
09-30-2022
02:03 PM
by
Claudia.Landiva
Hi Mohit
Here you go:)
#set ($date = ${latestEvent.eventTime})
#set ($newDate = ${date.getHours()}+(5))$date.setHours(${newDate})
#set ($newDate = ${date.getMinutes()}+(30))$date.setMinutes(${newDate})
#set( $String = ' ' ) $String.format('%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tSZ', ${date})
Ciao
edited for formatting, C. Landivar, Community Manager & Editor
03-05-2022 12:14 AM
Thanks Buddy!!
Worked for me.
Regards,
Mohit
09-30-2022 11:55 AM
Hi @Mario.Morelli ,
Can you help with EST? Time is showing eastern time but time zone is still showing UTC for me.
Thanks,
Rohan
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form