mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* FileSystemIDandChk/Plugins/LisaFS.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj: Added LisaFS skeleton with Lisa's MDDF and tag structs * FileSystemIDandChk/DateHandlers.cs: Added convert function from Lisa timestamp fields to C# DateTime git-svn-id: svn://claunia.com/FileSystemIDandChk@34 17725271-3d32-4980-a8cb-9ff532f270ba
This commit is contained in:
@@ -4,15 +4,22 @@ namespace FileSystemIDandChk
|
||||
{
|
||||
public static class DateHandlers
|
||||
{
|
||||
static readonly DateTime LisaEpoch = new DateTime(1904, 1, 1, 0, 0, 0);
|
||||
static readonly DateTime MacEpoch = new DateTime(1904, 1, 1, 0, 0, 0);
|
||||
static readonly DateTime UNIXEpoch = new DateTime(1970, 1, 1, 0, 0, 0);
|
||||
static readonly DateTime JulianEpoch = new DateTime(1858, 11, 17, 0, 0, 0);
|
||||
// Day 0 of Julian Date system
|
||||
static readonly DateTime JulianEpoch = new DateTime(1858, 11, 17, 0, 0, 0);
|
||||
|
||||
public static DateTime MacToDateTime(ulong MacTimeStamp)
|
||||
{
|
||||
return MacEpoch.AddTicks((long)(MacTimeStamp * 10000000));
|
||||
}
|
||||
|
||||
public static DateTime LisaToDateTime(Int32 LisaTimeStamp)
|
||||
{
|
||||
return LisaEpoch.AddSeconds(LisaTimeStamp);
|
||||
}
|
||||
|
||||
public static DateTime UNIXToDateTime(Int32 UNIXTimeStamp)
|
||||
{
|
||||
return UNIXEpoch.AddSeconds(UNIXTimeStamp);
|
||||
@@ -93,6 +100,7 @@ namespace FileSystemIDandChk
|
||||
|
||||
return decodedDT;
|
||||
}
|
||||
|
||||
// C# works in UTC, VMS on Julian Date, some displacement may occur on disks created outside UTC
|
||||
public static DateTime VMSToDateTime(UInt64 vmsDate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user