Using unixtime

N

Natan

Is there any method in .NET that returns the number of seconds since
januaty 1st 1970 (unix time) or i should create my own?
 
P

Patrick Steele [MVP]

Is there any method in .NET that returns the number of seconds since
januaty 1st 1970 (unix time) or i should create my own?

Nothing built in. You should be able to create a DateTime for Jan 1,
1970 and subtract it from DateTime.Now to get a TimeSpan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top