Assembly: mscorlib (in mscorlib.dll)
If necessary, the property converts the current DateTimeOffset object's date and time to the local system's date and time. The conversion is a two-step operation:
The property converts the current DateTimeOffset object's time to Coordinated Universal Time (UTC).
The property then converts UTC to local time.
There are no invalid times and ambiguous times are mapped to the local zone's standard time. (However, the conversion can create an anomaly: if a DateTimeOffset value that is derived from the local computer reflects an ambiguous date and time, that value can be converted to UTC and then back to a local time that differs from the original time.) The property applies any adjustment rules in the local time zone when it performs this conversion.
This property returns both the date and the time component of a DateTimeOffset object, which makes it useful for DateTimeOffset to DateTime conversion. In addition to performing any necessary time conversion, this property differs from the DateTime property by setting the value of the Kind property of the returned DateTime object to DateTimeKind.Local.
The following example illustrates several conversions of DateTimeOffset values to local times in the U.S. Pacific Standard Time zone. Note that the last three times are all ambiguous; the property maps all of them to a single date and time in the Pacific Standard Time zone.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.