Syntax:
DateTime TimeZoneInfo.ConvertTime(DateTime date-time, TimeZoneInfo destTimeZone);
Parameter(s):
- date-time: date-time to be converted in a particular time zone.
- destTimeZone: The time zone to convert dateTime to.
Return value:
This method returns the date and time after conversion in a particular time zone.
Exception(s):
- System.ArgumentException
- System.ArgumentNullException
-
Program:
The source code to convert a time to the time in a particular time zone is given below. The given program is compiled and executed successfully.
Output: