* 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:
2014-04-17 03:45:02 +00:00
parent 1dfda680a8
commit 1724edbcc6
4 changed files with 155 additions and 1 deletions

View File

@@ -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)
{