|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-04-14 10:25 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2019-04-14 10:25 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ Hi, Epoch time function strftime('%s') call returns empty on Windows but works on Linux. Tested PHP builds: PHP 7.3.2 (cli) (built: Feb 5 2019 23:14:21) ( NTS MSVC15 (Visual C++ 2017) x86) PHP 7.3.4 (cli) (built: Apr 2 2019 22:13:15) ( NTS MSVC15 (Visual C++ 2017) x86) PHP 7.0.33-0+deb9u3 (cli) (built: Mar 8 2019 10:01:24) ( NTS ) Cannot strftime('%s') be defined as alias to time()? If not can it be explicitly written in the manual (i.e. doesn't work in Windows). Thanks. Test script: --------------- <?php echo "time()=".time()."\n"; echo "strftime('%s')=".strftime('%s')."\n"; ?> Expected result: ---------------- time()=1555236075 strftime('%s')=1555236075 Actual result: -------------- time()=1555236100 strftime('%s')=