convertDateFromServerTimeZone (I18n - JavaScript)

Returns a new Date object that corresponds to the given date (in the XSP server time zone) but in the given user time zone. For example, if the given date is "1/1/03 1:00" in the XSP server time zone GMT -05:00, and if the given user time zone is GMT +01:00, the returned date will be: "1/1/03 7:00".

Defined in

I18n

Syntax

convertDateFromServerTimeZone(date:Date, userTZ:TimeZone) : Date
Parameters Description
date The source date
userTZ The user time zone.
Return value Description
Date The converted Date.