CSharp examples for System:DateTime Unix
Convert a unix timestamp to the corresponding datetime.
using System;/*from w w w. j a va 2s .co m*/ public class Main{ /// <summary> /// Convert a unix timestamp to the corresponding datetime. /// </summary> /// <param name="value"></param> /// <returns></returns> public static DateTime FromUnixTime(double value) { DateTime unixStart = new DateTime(1970, 1, 1, 0, 0, 0, 0); return unixStart.AddSeconds(value); } }