Convert .NET DateTime into Unix Time
The Unix calendar starts at 01/01/1970. This post will show you how to convert any DateTime value into a Unix time stamp. private const string InvalidUnixEpochErrorMessage = „Unix time starts January 1st, 1970“; /// <summary> /// Convert a long into a DateTime /// </summary> public static DateTime FromUnixTime(this Int64 self) { var ret = new…
Weiterlesen