cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

how to test new Date() in js without changing server time?

AP_10343008
12-Amethyst

how to test new Date() in js without changing server time?

how to test new Date() in js without changing server time?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Sathishkumar_C,

 

Just for clarification: Dates are converted into browser time zone only when shown, for example in the results or when passed into a mashup. It is "actually" still in UTC (or whatever the server time zone is set to).

 

So when logging a new Date() value, it will present as UTC, or when passing it to some other service, it will also be in UTC.

 

Regards,

Jens

View solution in original post

4 REPLIES 4

Hi @AP_10343008 

 

Could you please explain your use case 

 

/VR

Usaully new Date() will return the date and time with respect to browser time zone.

Hello @Sathishkumar_C,

 

Just for clarification: Dates are converted into browser time zone only when shown, for example in the results or when passed into a mashup. It is "actually" still in UTC (or whatever the server time zone is set to).

 

So when logging a new Date() value, it will present as UTC, or when passing it to some other service, it will also be in UTC.

 

Regards,

Jens

that's what i meant. thanks for the detailed clarification. 

Top Tags