DateTimeZone.SwitchZone

About

Changes the timezone information for the input DateTimeZone.

Syntax

DateTimeZone(dateTimeZone as datetimezone, timezoneHours as number,  optional timezoneMinutes as nullablenumber ) as nullable datetimezone  

Arguments

Argument Description
dateTimeZone The DateTimeZone to modify.
timezoneHours The house to add.
optional timezoneMinutes The minuts to add.

Remarks

  • If the input value does not have a timezone component, DateTimeZone.SwitchZone throws Expression.Error.

Examples

DateTimeZone.SwitchZone(#datetimezone(2010, 5, 4, 6, 5, 5, 0, 0), 8) equals #datetimezone(2010, 5, 4, 14, 5, 5, 8, 0)  
DateTimeZone.SwitchZone(#datetimezone(2010, 12, 31, 11, 56, 02, 7, 30), 0, -30) equals #datetimezone(2010, 12, 31, 3, 56, 2, 0, -30)