mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
* ODS.cs:
* HPFS.cs: * ISO9660.cs: * AppleMFS.cs: * AppleHFS.cs: * AppleHFSPlus.cs: Moved datetime conversion to DateHandlers class. * Symbian.cs: Identifies .SIS files. Yes I know it's not a filesystem but I needed it so. * Main.cs: Corrected typo * FileSystemIDandChk.csproj: Added datetime conversion handling class, Symbian .SIS installers, ext filesystem and ext2/3/4 filesystems. * ext2FS.cs: Detects ext2, ext3 and ext4 filesystems up to Linux 3.1 kernel. * extFS.cs: Detects ext filesystems. Untested as no Linux 2.0 was available at time :p * DateHandlers.cs: Moved all datetime convertions from plugins to central class. git-svn-id: svn://claunia.com/FileSystemIDandChk@11 17725271-3d32-4980-a8cb-9ff532f270ba
This commit is contained in:
@@ -130,11 +130,11 @@ namespace FileSystemIDandChk.Plugins
|
||||
sb.AppendFormat("Volume owner is \"{0}\" (ID 0x{1:X8})", homeblock.ownername, homeblock.volowner).AppendLine();
|
||||
sb.AppendFormat("Volume label: \"{0}\"", homeblock.volname).AppendLine();
|
||||
sb.AppendFormat("Drive serial number: 0x{0:X8}", homeblock.serialnum).AppendLine();
|
||||
sb.AppendFormat("Volume was created on {0}", VMSDateToDateTime(homeblock.credate).ToString()).AppendLine();
|
||||
sb.AppendFormat("Volume was created on {0}", DateHandlers.VMSToDateTime(homeblock.credate).ToString()).AppendLine();
|
||||
if(homeblock.revdate > 0)
|
||||
sb.AppendFormat("Volume was last modified on {0}", VMSDateToDateTime(homeblock.revdate).ToString()).AppendLine();
|
||||
sb.AppendFormat("Volume was last modified on {0}", DateHandlers.VMSToDateTime(homeblock.revdate).ToString()).AppendLine();
|
||||
if(homeblock.copydate > 0)
|
||||
sb.AppendFormat("Volume copied on {0}", VMSDateToDateTime(homeblock.copydate).ToString()).AppendLine();
|
||||
sb.AppendFormat("Volume copied on {0}", DateHandlers.VMSToDateTime(homeblock.copydate).ToString()).AppendLine();
|
||||
sb.AppendFormat("Checksums: 0x{0:X4} and 0x{1:X4}", homeblock.checksum1, homeblock.checksum2).AppendLine();
|
||||
sb.AppendLine("Flags:");
|
||||
sb.AppendFormat("Window: {0}", homeblock.window).AppendLine();
|
||||
@@ -280,15 +280,6 @@ namespace FileSystemIDandChk.Plugins
|
||||
public UInt16 reserved2; // Reserved
|
||||
public UInt16 checksum2; // Checksum of preceding 255 words (16 bit units)
|
||||
}
|
||||
|
||||
// C# works in UTC, VMS on Julian Date, some displacement may occur on disks created outside UTC
|
||||
private DateTime VMSDateToDateTime(UInt64 vmsDate)
|
||||
{
|
||||
DateTime date = new DateTime(1858, 11, 17, 0, 0, 0); // Epoch, day 0 of Julian Date system
|
||||
double delta = vmsDate * 0.0001; // Tenths of microseconds to milliseconds, will lose some detail
|
||||
date = date.AddMilliseconds(delta);
|
||||
return date;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user