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

CSharp examples for System:DateTime Convert

Description

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

Demo Code

// it and/or modify it under the terms of the MIT License. 
using System;/*from  w ww.  j  a v  a  2s  . c om*/

public class Main{
        #region Public Methods and Operators

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

Related Tutorials