Community Conundrums are live! Learn more

Ircorrect when using "parse date" in preaparation

Level 1
Ircorrect when using "parse date" in preaparation

When I use formula in preparation, i choose the Time Zone to Asia / Jakarta and expect the original time (in UTC) will change to GMT +7, but seem DSS do incorrecly:



Original Date: 2018-01-22T12:02:55.891Z



Expected Date: 2018-01-22T19:02:55.891Z



DSS Converted Date: 2018-01-22T05:02:55.891Z



What wrong I did?



 



0 Kudos
2 Replies
Dataiker
Dataiker
Hi,

Actually your input date is already parsed and does not need parsing (see that it already has meaning "Date").

By removing the timezone from the pattern (because you put it as a constant), and selecting Asia/Jakarta in the parse step, you're actually telling it "ignore the timezone already specified in the date, and consider that the untimezoned thing that you just read is in Jakarta".

Then, DSS always currently displays the parsed date in UTC. So you parsed "noon in Jakarta", which indeed corresponds to "5 AM UTC", which is what DSS shows.

If you want to do the opposite, ie display this UTC date in the Jakarta local time, you need to use a "Format date" step instead of parse date, and select Asia/Jakarta as the time zone there
Level 1
Author
thanks you. it works
0 Kudos