Generate a Unix Timestamp in C#

This code will allow you to generate a unix timestamp for a given DateTime, turn a unix timestamp back into a DateTime, or get the current unix timestamp.

64-bit version (future proof)

32-bit signed version