Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateValue.toRational() fails in year 2038 #3080

Open
jim-easterbrook opened this issue Nov 30, 2024 · 0 comments
Open

DateValue.toRational() fails in year 2038 #3080

jim-easterbrook opened this issue Nov 30, 2024 · 0 comments

Comments

@jim-easterbrook
Copy link
Contributor

DateValue.toRational() returns the date as a UNIX calendar time converted to Rational. This is a pair of signed int32 so cannot handle the 0x7fffffff 31-bit overflow of the signed UNIX epoch.

This was discovered by someone running tests on my Python interface to exiv2.
jim-easterbrook/python-exiv2#44

(I can't think why anyone would want a UNIX timestamp as a Rational, but the method is there so it ought to work.)

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

No branches or pull requests

2 participants