Dela via


DateTimeZone.ToUtc

Syntax

DateTimeZone.ToUtc(dateTimeZone as nullable datetimezone) as nullable datetimezone

Om

Ändrar tidszonsinformationen för datetime-värdet dateTimeZone till utc- eller universell tidszonsinformation. Om dateTimeZone inte har någon tidszonskomponent läggs UTC-tidszonsinformationen till.

Exempel 1

Ändra tidszonsinformation för #datetimezone(2010, 12, 31, 11, 56, 02, 7, 30) till UTC-tidszon.

Användning

DateTimeZone.ToUtc(#datetimezone(2010, 12, 31, 11, 56, 02, 7, 30))

utdata

#datetimezone(2010, 12, 31, 4, 26, 2, 0, 0)