Skip to content

Conversation

@kobo220
Copy link
Contributor

@kobo220 kobo220 commented May 26, 2025

If a birthday is added to a contact without a year, it is stored with the year 1604. These dates can cause an issue in Windows Python with the current function that is used to parse these dates. If one of these dates is found the addressBook.py artifact causes the error: "OSError: [Errno 22] Invalid argument" and completely fails to output any results. This change replaces datetime.utcfromtimestamp (which is also depreciated) with manually creating a Cocoa Epoch to avoid out of range date problems. The datetime.fromtimestamp function is also susceptible to this problem.

@Johann-PLW
Copy link
Collaborator

Thank you very much @kobo220 for updating the function and solving this issue.

@Johann-PLW Johann-PLW merged commit f5e278b into abrignoni:main May 26, 2025
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.

2 participants