added code to reverse timestamp operation
This commit is contained in:
parent
e734383164
commit
1b6ba42639
1 changed files with 8 additions and 0 deletions
|
@ -62,5 +62,13 @@ namespace Saviour_Backup_System
|
||||||
|
|
||||||
return BitConverter.ToString(md5.Hash).Replace("-", "").ToLower();
|
return BitConverter.ToString(md5.Hash).Replace("-", "").ToLower();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DateTime unixDateTime(long unixTimeStamp)
|
||||||
|
{
|
||||||
|
// Unix timestamp is seconds past epoch
|
||||||
|
System.DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);
|
||||||
|
dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime();
|
||||||
|
return dtDateTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue