Repository navigation
Fix edge cases in Cocoa, birthdate and size conversion helpers - #453
Merged
Merged
Conversation
Same fixes as abrignoni/iLEAPP#2795 for this copy of scripts/ilapfuncs.py: - convert_cocoa_core_data_ts_to_utc added the 2001 offset before scaling, so Cocoa times in ms, us or ns came out about 31 years early. Positive values from 10**11 are now scaled first. - It also showed NSDate.distantPast as 1968 and distantFuture as 1972. Both now come back blank, like an absent date. Pre-1970 dates still convert. - get_birthdate_from_unix_ts raised AttributeError on an empty value. - convert_bytes_to_unit returned a bare number from 1 TiB up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Levels the shared helper fixes from abrignoni/iLEAPP#2795 into this copy of
scripts/ilapfuncs.py, which carried the same four defects.convert_cocoa_core_data_ts_to_utc: ms, µs and ns Cocoa times came out about 31 years early; NSDate.distantPast and distantFuture showed as 1968 and 1972 and now come back blank, like an absent date. Pre-1970 dates still convert.get_birthdate_from_unix_tscrashed on an empty value.convert_bytes_to_unitreturned a bare number from 1 TiB up.New tests fail on main and pass here. Full suite: 1,036 OK. No artifact or other module in this repo calls these three helpers today, so no report output can change and a corpus run would not exercise them; the fix keeps the shared file in step.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
🤖 Generated with Claude Code