DateTime.AddZone
DateTime.AddZone(dateTime as nullable datetime, timezoneHours as number, optional timezoneMinutes as nullable number) as nullable datetimezone
Adds timezone information to the dateTime
value. The timezone information includes timezoneHours
and optionally timezoneMinutes
, which specify the desired offset from UTC time.
Set the timezone to UTC+7:30 (7 hours and 30 minutes past UTC).
Usage
DateTime.AddZone(#datetime(2010, 12, 31, 11, 56, 02), 7, 30)
Output
#datetimezone(2010, 12, 31, 11, 56, 2, 7, 30)