strftime() works differently depending on the operating system and the libc version. And it's not thread-safe, according to this discussion:
https://externals.io/message/113657#114966
It looks like this strftime() usage does not use any locale-specific "format parameter strings". And I don't find any calls to setlocale() in the code of php-font-lib. But maybe I'm wrong.
If the output is not locale-specific, a simple
date('Y-m-d H:i:s', $date);
can also be used, or not? Or is there any edge-case that I'm missing?
https://github.com/PhenX/php-font-lib/blob/ca6ad461f032145fff5971b5985e5af9e7fa88d8/src/FontLib/BinaryStream.php#L285
strftime()
is mentioned in an RFC to be deprecated in PHP 8.1 and removed in PHP 9 if the voting succeeds: https://wiki.php.net/rfc/deprecations_php_8_1strftime()
works differently depending on the operating system and the libc version. And it's not thread-safe, according to this discussion: https://externals.io/message/113657#114966It looks like this strftime() usage does not use any locale-specific "format parameter strings". And I don't find any calls to
setlocale()
in the code of php-font-lib. But maybe I'm wrong.If the output is not locale-specific, a simple
date('Y-m-d H:i:s', $date);
can also be used, or not? Or is there any edge-case that I'm missing?