Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Get The Unix Epoch Time In One Line Of C#

DZone 's Guide to

Get The Unix Epoch Time In One Line Of C#

One line of C#, so much awesomeness: The Unix epoch time.

· Java Zone ·
Free Resource

int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;


Topics:
java ,c# ,unix ,epoch time

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}