There is this example code, but then it starts talking about millisecond / nanosecond problems.
The same question is on MSDN, Seconds since the Unix epoch in C#<
public static class UnixTime { private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0); public static DateTime UnixTimeToDateTime(double unixTimeStamp) { return Epoch.AddSeconds(unixTimeStamp).ToUniversalTime(); } }
you can call UnixTime.UnixTimeToDateTime(double datetime))