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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

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

AP_10343008
14-Alexandrite

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

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

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. 

Announcements


Top Tags