Possible duplicate:How do you convert era time to C #?
I am trying to figure out how to get an era time in C #. Similar to the time stamps indicated on this website: http://www.epochconverter.com/
Does the DateTime method have this for this?
TimeSpan t = DateTime.UtcNow - new DateTime(1970, 1, 1); int secondsSinceEpoch = (int)t.TotalSeconds; Console.WriteLine(secondsSinceEpoch);