Skip to content

Conversation

@foreverallama
Copy link
Contributor

This is a small fix towards #212 and #215 (builds on #213 ) where it looks like MATLAB has made a few subtle changes in newer versions:

  1. MATLAB datetime appears to store some sort of time precision in a complex number. I'm not sure what it is exactly, and until it can be figured out this a temporary fix to prevent errors due to float remainders when converting to Julia DateTime.

  2. Newer MATLAB versions seem to maintain a separate object ID counter for some built-in types like string and maybe even timetable which are serialized using a saveobj method. This means that these objects no more contain a dep_id which was used to deserialize dynamic properties. The fix takes care of this case. This update shouldn't be a problem for writing as MATLAB should be maintaining backward compatibility.

@matthijscox
Copy link
Member

No unit tests needed you think?

@foreverallama
Copy link
Contributor Author

Not sure. Do we just keep adding MAT-files for different MATLAB versions? Will be good to make sure we don't break anything backwards, but I don't have access to the latest MATLAB version to generate test cases.

Any case, don't think this is ready to merge yet as the intended behaviour needs to be better understood for both issues addressed in this PR.

@matthijscox
Copy link
Member

matthijscox commented Dec 3, 2025

You know what, I'll install 2024b for this reason alone :) Will probably take a few hours.

I do agree we should be careful with polluting the package with test files. But perhaps this is important enough to add one small 2024 test file?

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