cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert GMT time to latest time

Former Member
0 Kudos


Hi Experts,

My scenario is File to Mail scenario. Here I need to trigger the mail when the file will reached to the assigned folder. My mail format is like

EX: I have to trigger the mail like File XXX  received at  20150918 10:30:27

In my sender file communication channel I have enabled the SOURCE FILE  TIMESTAMP option. I have written UDF to get the source time stamp. But time stamp is coming like 5.30 hrs back to current time.

EX:  Current time is like      20150918 10:30:27

        Receiving time is like  20159018  05:00:00

I want the time stamp like current time. Iam unable to do this. Kindly help on this.

Regards,

Anji Reddy.

Accepted Solutions (0)

Answers (2)

Answers (2)

aby_jose
Explorer
0 Kudos

Hi,

You can perform it by applying Timezone change from "java.util.TimeZone" package.

It has methods for setting TimeZone.

Eg: "Calendar.setTimeZone(timeZone)"

Thanks,

Aby

engswee
Active Contributor
0 Kudos

Hi Anji

The timestamp added by PI is based on the server time zone. My guess is the server time zone is different from your working location.

You can try option 2 mentioned in my blog below, which involves a UDF.

Rgds

Eng Swee