convertDateTimeZone (I18n - JavaScript)
Returns a new Date object that corresponds to the given date in a source time zone to a target time zone. For example, if the given date is "1/1/03 7:00" in the source time zone GMT +01:00, and if the target time zone is GMT -05:00, the returned date will be: "1/1/03 1:00".
Defined in
I18nSyntax
convertDateTimeZone(date:Date, sourceTZ:TimeZone, targetTZ:TimeZone) : Date
Parameters | Description |
---|---|
date |
The source date |
sourceTZ |
The source time zone. |
targetTZ |
The target time zone. |
Return value | Description |
---|---|
Date |
The converted date. |