mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.Filesystems/UCSDPascal/Dir.cs:
Typo. * DiscImageChef.Helpers/DateHandlers.cs: Added CP/M timestamp converter. * DiscImageChef.Partitions/Acorn.cs: Corrected handling of negative values. * DiscImageChef/Commands/ExtractFiles.cs: Corrected behaviour when volume name is missing, null or empty. * DiscImageChef.DiscImages/ImagePlugin.cs: Added floppy address mark sector tag.
This commit is contained in:
@@ -164,6 +164,19 @@ namespace DiscImageChef
|
||||
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);
|
||||
}
|
||||
|
||||
public static DateTime CPMToDateTime(byte[] timestamp)
|
||||
{
|
||||
ushort days = BitConverter.ToUInt16(timestamp, 0);
|
||||
int hours = timestamp[2];
|
||||
int minutes = timestamp[3];
|
||||
|
||||
DateTime temp = AmigaEpoch.AddDays(days);
|
||||
temp = temp.AddHours(hours);
|
||||
temp = temp.AddMinutes(minutes);
|
||||
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user