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#<
I found the right answer just by comparing the conversion to 1/1/1970 w/o the local time adjustment;
DateTime date = new DateTime(2011, 4, 1, 12, 0, 0, 0); DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0); TimeSpan span = (date - epoch); double unixTime =span.TotalSeconds;