Mono Class Library: System.DateTime Overview | MembersSystem.DateTime.ToUniversalTime Method |
Converts the current DateTime value to coordinated universal time (UTC). [Edit]
|
The UTC DateTime equivalent of the current DateTime value. If the result is too large or too small to be represented as a DateTime, the current function returns a DateTime set to DateTime.MaxValue or DateTime.MinValue . [Edit]
This method assumes that the current instance of DateTime holds the local time value, and not a UTC time. Therefore each time it is run, this method performs the necessary modifications on the DateTime to derive the UTC time, whether the current DateTime holds the local time or not.
The local time zone information is obtained from the operating system.
[Edit]
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0