Skip to content

Instantly share code, notes, and snippets.

@thunsaker
Created August 29, 2011 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thunsaker/1178853 to your computer and use it in GitHub Desktop.
Save thunsaker/1178853 to your computer and use it in GitHub Desktop.
Convert long FromUnixTime to DateTime
public DateTime FromUnixTime(long unixTime)
{
var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
return epoch.AddSeconds(unixTime);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment