Tuesday, March 4, 2008

Get the Unix Epoch time in one line of C#

I saw this code someplace else on the interwebs and stringified it.

((int)((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds)).ToString()

No comments: