Version

ToLocalTime(DateTime,DateTimeKind) Method

Returns the date/time of the specified time for the time zone represented by this TimeZoneInfo object. The translation is made using this computer's time zone information.
Syntax
'Declaration
 
Public Overloads Function ToLocalTime( _
   ByVal time As Date, _
   ByVal kind As DateTimeKind _
) As Date
public DateTime ToLocalTime( 
   DateTime time,
   DateTimeKind kind
)

Parameters

time
The date/time to be translated.
kind
A DateTimeKind value which describes whether the specified time should be interpreted as a local or universal time. Note that if this parameter is set to 'Unspecified', the time is interpreted as a universal time.

Return Value

The translated date/time for this time zone.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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

See Also