want to convert UTC date to PST

saurabhpad
New Contributor II
New Contributor II

Hi,

We are updating users cp35 with current date, we are using below syntax. CP35 is updated with current date but timing is UTC. We want to convert this time to PST. Is there any way to convert it.

${Calendar.getInstance().getTime().format('yyyy-MM-dd')}

3 REPLIES 3

pmahalle
Valued Contributor II
Valued Contributor II

@saurabhpad Which connector you are using to add the current date in CP35?


Regards,

Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept it As Solution to help others who may have a similar problem.

saurabhpad
New Contributor II
New Contributor II

we are using rest connector to update users CP value

armaanzahir
Regular Contributor III
Regular Contributor III

Hi @saurabhpad ,

 

Can you try using the following:

${new Date().format('MM-dd-yyyy hh:mm a',TimeZone.getTimeZone('PST'))}

Below is a list of all available timezones:

What are the Java TimeZone IDs? | Gary Gregory (wordpress.com)

 

 

Regards,
Md Armaan Zahir