You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When i try to open any zip file this error is produced in my application:
"Cannot create date/time object for timestamp 1730994211"
I found the error is produced in the function 'ntfsTimeToDateTime' of the class 'PhpZip\Model\Extra\Fields\NtfsExtraField' because of the Locale used by my application
Description
When i try to open any zip file this error is produced in my application:
"Cannot create date/time object for timestamp 1730994211"
I found the error is produced in the function 'ntfsTimeToDateTime' of the class 'PhpZip\Model\Extra\Fields\NtfsExtraField' because of the Locale used by my application
How to reproduce
Simplified code example
composer.json
test.php
Install dependency with composer
Create a zip file called 'test.zip' in the same directory as the 'test.php' script
Execute
Possible Solution
When using sprintf('%.6f', $timestamp), use the 'locale independent' for float conversions -> sprintf('%.6F', $timestamp)
Additional context
https://php.watch/versions/8.0/float-to-string-locale-independent
The text was updated successfully, but these errors were encountered: