CSharp examples for System:DateTime UTC
Gets the UTC adjusted time.
using System;/*from w w w . j a v a2s . c o m*/ public class Main{ /// <summary> /// Gets the UTC adjusted time. /// </summary> /// <param name="source">The date.</param> /// <returns></returns> public static DateTime GetUtcAdjustedTime(this DateTime source) { return new DateTime(source.Ticks, DateTimeKind.Utc); } }