CONV_TIMESTAMP

Use the CONV_TIMESTAMP script function to convert a date and time to a different time zone. For more information, see Time Zone (TZ). The script function returns the timestamp in the YYYY-MM-DD HH:MM:SS format .

Syntax

CONV_TIMESTAMP (Timestamp,[TimeZone1][,TimeZone2])

Parameters

Important! If you do not use UTC as the basis for calculation, conversion results are imprecise when you change from Daylight Savings Time to Standard Time. Example: The system cannot identify whether the time 02:30:00 refers to its first occurrence in Daylight Savings Time, or to its second occurrence in Standard Time. Therefore, the system reads it as its first occurrence. For details, see Daylight Saving and Standard Time Changes.

Example

You have two Time Zone objects: one for Sydney, Austria (TZ.SYD), and another for Central European time (TZ.CET). The following script converts the timestamp for the turn of the year 2017/2018.

:SET &CET# = CONV_TIMESTAMP("2018-01-01 00:00:00","TZ.SYD","TZ.CET")

:PRINT &CET#

Line in the activation report:

2019-03-28 10:17:59 - U00020408 2017-12-31 14:00:00

See also:

seealso

Script Date and Time Functions

Date, Time and Period Formats in Scripts