Get The Unix Epoch Time In One Line Of C#
One line of C#, so much awesomeness: The Unix epoch time.
Join the DZone community and get the full member experience.Join For Free
int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
Opinions expressed by DZone contributors are their own.