I want to convert epoch to human readable date and vice versa.
I want to write something similar to link in C#.
Converting the date in the places.sqlite file in Firefox to a DateTime.
static void Main(string[] args)
{
//1540787809621000
string epoch = "1540787809621000";
}
private string epoch2string(int epoch) {
return
new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)
.AddSeconds(epoch)
.ToShortDateString();
}
int size Not enough I try long epoch but not work