public static FromUnixTimestamp ( this target, int timestamp ) : System.DateTime | ||
target | this | |
timestamp | int | The number of seconds from Epoch |
return | System.DateTime |
public static DateTime FromUnixTimestamp(this DateTime target, int timestamp)
{
DateTime Date = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
return Date.AddSeconds(timestamp);
}