public static long ToMillisecondsTimestamp(this DateTime d) { return (long)(d.ToUniversalTime() - new DateTime(1970, 1, 1)).TotalMilliseconds; }