cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect timestamp in Alert Emails using Alert Consumer Job V2

Former Member
0 Kudos

Hi PI Gurus,

I have created Email Alert in SAP PI single stack using CBMA using below link:

Emails for Alerts are working fine as expected.

But Issue I am facing here is incorrect timestamp is appearing in Alert Emails, we have used India Time Zone and have checked the same at OS level.

Example Below : Alert got generated at 8 AM today but time appearing is 02:30:35Z

______________________________________________________________________________________________

Hi,

Email Alert from SAP PI.

There is an alert created at 2016-01-08T02:30:35Z on SAP PI Production System.

__________________________________________________________________________________


Can some one please help me in resolving this issue?


Regards,

SV

Accepted Solutions (0)

Answers (2)

Answers (2)

siddhesh_pathak4
Contributor
0 Kudos

Hello,

I see similar problem but no solution so far. Can someone from SAP help us on making sure it follows system time-stamp and not UTC/GMT? I am looking for CST time-stamp.

Thank you,

Siddhesh

former_member182412
Active Contributor
0 Kudos

Hi Siddhesh,

I think you need to log a call to SAP for this, i have tested the below small program, i think SAP has done similar thing in their code.


import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.TimeZone;

public class DateTest {

  public static void main(String[] args) {

  SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");

  dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));

  System.out.println(dateFormat.format(new Date(new Date().getTime())));

  }

}


2016-01-12T13:59:53Z

Regards,

Praveen.

engswee
Active Contributor
0 Kudos

Hi Sarvjeet

The suffix Z basically means that the time is specified in UTC/GMT time. Since the difference between India and UTC/GMT is 5.5 hours, the timestamp is correct.

Rgds

Eng Swee

Former Member
0 Kudos

Thanks Eng for your valuable feedback,

Can you please let me know how to change this to India Time Zone ?

Regards,
SV

engswee
Active Contributor
0 Kudos

I'm guessing you are using the variable $timestamp$ in your email template. Honestly, I don't think it's possible to change it since the template doesn't allow you to do any transformation etc. Maybe you can just add a few extra lines to indicate that it is UTC/GMT and mention the difference of time in the template.