Bug #77891 [Opn->Nab]: Epoch time function strftime('%s') call returns empty on Windows but works on L

From: Date: Sun, 14 Apr 2019 10:25:19 +0000
Subject: Bug #77891 [Opn->Nab]: Epoch time function strftime('%s') call returns empty on Windows but works on L
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220442@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77891&edit=1 ID: 77891 Updated by: requinix@php.net Reported by: phpbugreport at mailinator dot com Summary: Epoch time function strftime('%s') call returns empty on Windows but works on L -Status: Open +Status: Not a bug Type: Bug Package: Date/time related Operating System: Windows PHP Version: 7.3.4 Block user comment: N Private report: N New Comment: The documentation already warns you about this: > Not all conversion specifiers may be supported by your C library... > For Windows systems, a complete overview of supported conversion specifiers can be found at > » MSDN. http://msdn.microsoft.com/en-us/library/fe06s4ak.aspx Previous Comments: ------------------------------------------------------------------------ [2019-04-14 10:14:18] phpbugreport at mailinator dot com 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')= ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77891&edit=1

« previous php.bugs (#220442) next »