public static long GetTimestamp(DateTime dateTime) { return (dateTime.Ticks - new DateTime(1970, 1, 1, 0, 0, 0, 0).Ticks) / 10000; }