Unix-Timestamp in C#

February 24th, 2009, 11:35H · Topics: Allgemeines · Print

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;

Tags: , ,

Leave a Reply

Your email address will not be published. Your photo in comments, use Gravatar
Please include http://
Note: XHTML is allowed.

Subscribe to this comment feed via RSS

Software-Development & Support

Hyte Software Developing great software, and enhancing your experience in using OpenSource-Software