mirror of
https://github.com/aaru-dps/Aaru.Helpers.git
synced 2025-12-16 19:24:35 +00:00
* README.md:
* DiscImageChef.DiscImages/CopyQM.cs: * DiscImageChef.DiscImages/DiscImageChef.DiscImages.csproj: Added support for Sydex CopyQM disk image format. * DiscImageChef.CommonTypes/MediaType.cs: Corrected typo. * DiscImageChef.DiscImages/DiskCopy42.cs: Misplacement of XML media type setting. * DiscImageChef.Helpers/DateHandlers.cs: Added DOS to C# date converter.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2016-08-07 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* DateHandlers.cs: Added DOS to C# date converter.
|
||||||
|
|
||||||
2016-08-01 Natalia Portillo <claunia@claunia.com>
|
2016-08-01 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* AssemblyInfo.cs:
|
* AssemblyInfo.cs:
|
||||||
|
|||||||
@@ -150,6 +150,20 @@ namespace DiscImageChef
|
|||||||
DicConsole.DebugWriteLine("UCSDPascalToDateTime handler", "dateRecord = 0x{0:X4}, year = {1}, month = {2}, day = {3}", dateRecord, year, month, day);
|
DicConsole.DebugWriteLine("UCSDPascalToDateTime handler", "dateRecord = 0x{0:X4}, year = {1}, month = {2}, day = {3}", dateRecord, year, month, day);
|
||||||
return new DateTime(year, month, day);
|
return new DateTime(year, month, day);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DateTime DOSToDateTime(ushort date, ushort time)
|
||||||
|
{
|
||||||
|
int year = ((date & 0xFE00) >> 9) + 1980;
|
||||||
|
int month = (date & 0x1E0) >> 5;
|
||||||
|
int day = date & 0x1F;
|
||||||
|
int hour = (time & 0xF800) >> 11;
|
||||||
|
int minute = (time & 0x7E0) >> 5;
|
||||||
|
int second = (time & 0x1F) * 2;
|
||||||
|
|
||||||
|
DicConsole.DebugWriteLine("DOSToDateTime handler", "date = 0x{0:X4}, year = {1}, month = {2}, day = {3}", date, year, month, day);
|
||||||
|
DicConsole.DebugWriteLine("DOSToDateTime handler", "time = 0x{0:X4}, hour = {1}, minute = {2}, second = {3}", time, hour, minute, second);
|
||||||
|
return new DateTime(year, month, day, hour, minute, second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user