Converts a date that is in the user's local time to Pre Time. - CSharp System

CSharp examples for System:DateTime Convert

Description

Converts a date that is in the user's local time to Pre Time.

Demo Code

// it and/or modify it under the terms of the MIT License. 
using System;/*from   ww w  .  j a v  a2  s  .  co  m*/

public class Main{
        /// <summary>Converts a date that is in the user's local time to Eve Time.</summary>
        /// <param name="localTime">The local date/time.</param>
        /// <returns>The <see cref="DateTime" />.</returns>
        public static DateTime ToEveTime(this DateTime localTime)
        {
            return TimeZone.CurrentTimeZone.ToUniversalTime(localTime);
        }
}

Related Tutorials