Skip to content

Handle pre-epoch media dates safely#512

Open
TerryFrench wants to merge 2 commits intojmathai:masterfrom
TerryFrench:pr/05-pre-epoch
Open

Handle pre-epoch media dates safely#512
TerryFrench wants to merge 2 commits intojmathai:masterfrom
TerryFrench:pr/05-pre-epoch

Conversation

@TerryFrench
Copy link
Copy Markdown
Contributor

Summary

Adds robust handling for media timestamps before Unix epoch (e.g. 1960) across date parsing and file time updates.

Changes

  • Avoids hard failures from time.mktime/os.utime on platforms that do not support negative epoch values.
  • Uses safer timestamp conversion/fallback logic in media date handling.
  • Adds tests for pre-epoch metadata and filesystem timestamp behavior.

Why

Some archives contain historical media with pre-1970 dates; previous behavior could crash or fail on certain platforms.

Dependency

This PR is based on #509 (pr/02-unicode-path) because it builds on related filesystem/media changes.

Tests

Ran all tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant