Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
heading0
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse


Syntax

toTimeZone(date, timeZone)

Package


Alias


Pkg Usage



Description

Excerpt
hiddentrue
Converts a date to the specified time zone.

...

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse


Parameter name

Type

Required

Description

date

Date

Yes

Specifies the date to convert.

timeZone

String

No

Specifies the time zone using a format compatible with TimeZone. See TimeZone for more details.


Return Type

Date

Example

Code Block
languagejs
desc = "";
date d = toDate(2012, 01, 20, 0, 0, 0, 0, "GMT-8");
string format = "dd-MMM-yyyy HH:mm:ss Z";
desc += formatDate(d, format) + " converted to " + formatDate(toTimeZone(d, "GMT+2"), format);

...