DateTimeZone.ToLocal

Adjusts the timezone data of the dateTimeZone value to match the local timezone. If dateTimeZone does not already include timezone information, the local timezone is incorporated.

Syntax

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

About

Adjusts the timezone data of the dateTimeZone value to match the local timezone. If dateTimeZone does not already include timezone information, the local timezone is incorporated.

Explanation

Modify the timezone data for #datetimezone(2010, 12, 31, 11, 56, 02, 7, 30) to the local timezone (PST). Utilize Power Query MDateTimeZone.ToLocal(#datetimezone(2010, 12, 31, 11, 56, 02, 7, 30)) function. Result: #datetimezone(2010, 12, 31, 12, 26, 2, -8, 0)