DateTimeZone.ToUtc
Converts the timezone component to UTC timezone.
Syntax
DateTimeZone.ToUtc(
dateTimeZone as datetimezone
) as datetimezone
Remarks
Changes timezone information of the datetime value dateTimeZone
to the UTC or Universal Time timezone information. If dateTimeZone
does not have a timezone component, the UTC timezone information is added.
Examples
Example #1
Change timezone information for #datetimezone(2010, 12, 31, 11, 56, 02, 7, 30) to UTC timezone.
DateTimeZone.ToUtc(#datetimezone(2010, 12, 31, 11, 56, 02, 7, 30))
Result:
#datetimezone(2010, 12, 31, 4, 26, 2, 0, 0)
Category
DateTimeZone