Unix-Timestamp in C#

by Rainer Bendig on February 24, 2009

Hin und wieder ganz nützlich, die Berechnung eines Unix-Timestamps in C#:

var ts = (DateTime.UtcNow - new DateTime(1970,1,1,0,0,0));
varunixTime = ts.TotalSeconds;

Leave your comment

Required.

Required. Not published.

If you have one.