convertDateToServerTimeZone (I18n - JavaScript)

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

Defined in

I18n

Syntax

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