Bug #74982 [NEW]: strftime %P not working on Alpine Linux
From: ryan at ryanparman dot com
Operating system: Alpine Linux 3.4
PHP version: 7.1.7
Package: Unknown/Other Function
Bug Type: Bug
Bug description:strftime %P not working on Alpine Linux
Description:
------------
I'm using the official PHP Docker container "php:7.1.7-fpm-alpine",
which is based on Alpine Linux 3.4.
https://github.com/docker-library/php/blob/ddc7084c8a78ea12f0cfdceff7d03c5a530b787e/7.1/fpm/alpine/Dockerfile
When using strftime() on Alpine Linux, the %P modifier does not appear
to be supported. When used, the resulting value is (bool) false.
The documentation on http://php.net/strftime says:
> Mac OS X only: The %P modifier is not supported in the Mac OS X
implementation of this function.
I would assume that the follow-up to this ticket would either be:
1. To update the documentation to explain that this modifier is
unsupported on Alpine Linux in addition to macOS. And/orâ¦
2. That this is a proper bug, and Alpine Linux support should be fixed
at some point.
Test script:
---------------
https://gist.github.com/skyzyx/55e2dea4e7f8fbc6854b2c81f51e8cf9
Expected result:
----------------
I expect the result to be string(7) "06:12pm".
Actual result:
--------------
The actual result is bool(false).
--
Edit bug report at https://bugs.php.net/bug.php?id=74982&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74982&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74982&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74982&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74982&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74982&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74982&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74982&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74982&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74982&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74982&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74982&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74982&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74982&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74982&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74982&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74982&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74982&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74982&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74982&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74982&r=mysqlcfg
Thread (4 messages)
- ryan at ryanparman dot com