DateTimeZone.ToLocal

About

Returns a DateTime value from the local time zone.

Syntax

DateTimeZone.ToLocal(dateTime as datetimezone) as nullable datetimezone  

Arguments

Argument Description
dateTime The DateTimeZone to convert.

Example

//assuming local as PST   
dateTime  = DateTimeZone.FromText("2011-02-20T22:19:27+03:00")  
localTime=DateTimeZone.ToLocal(dateTime) equals 2011-02-20T11:19:27-08:00