mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Implement decoding High Sierra timestamp.
This commit is contained in:
@@ -21,5 +21,21 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
DateTime? DecodeHighSierraDateTime(HighSierraTimestamp timestamp)
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime date = new DateTime(timestamp.Years + 1900, timestamp.Month, timestamp.Day, timestamp.Hour,
|
||||
timestamp.Minute, timestamp.Second, DateTimeKind.Unspecified);
|
||||
|
||||
return TimeZoneInfo.ConvertTimeToUtc(date, TimeZoneInfo.FindSystemTimeZoneById("GMT"));
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
// ISO says timestamp can be unspecified, suppose same for High Sierra
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user