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
How to suppress "Invalid date/time in zip entry" warning? #112
Comments
+1 Having this issue, too |
Fix for issue #112 - ability to not show warning about incorrect date
👍 Same here. |
@simonoff I think you can close this issue |
For anyone visiting who still experiences this issue, the fix by @ShockwaveNN is to upgrade to Rubyzip 1.1.7 and add: Zip.warn_invalid_date = false |
We experienced this issue because we were stubbing the to_binary_dos_date and returning 0. However 0 is not a valid value that parse_binary_dos_format expects. You can calculate a valid number by following the method to_binary_dos_date. For example, for Dec 1, 2015, you would use 18305. Return a valid value and you won't get the warning messages. |
the Zip.warn_invalid_date = false solution also works for zip-zip |
rubyzip inserts this error in the logs every time I open a kmz file. I have no control over the input files and I'm not sure I'd worry about an invalid date even if I did.
Is there any way to suppress this message?
It looks like it's generated by a puts call:
rubyzip/lib/zip/entry.rb
Line 557 in 3917ded
Thanks!
The text was updated successfully, but these errors were encountered: