cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

End User Monitoring (EUM)

Custom time on E-mail alerts

SOLVED
Ilya.Nagornyy
New Member

Custom time on E-mail alerts

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?

Tags (2)
By replying you agree to the Terms and Conditions of the AppDynamics Community.
Custom time on E-mail alerts
4 REPLIES 4
Mario.Morelli
Architect

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})



Learn more about me in the Community Member Spotlight Q & A
Mohit.Gupta
Maker

Hi @Mario.Morelli,

 

Can you help me with +5:30 for IST time?

 

Mario.Morelli
Architect

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



Learn more about me in the Community Member Spotlight Q & A
Mohit.Gupta
Maker

Thanks Buddy!!

 

Worked for me.

 

Regards,

Mohit