#34052 [Ver]: date('U') returns %ld not unix timestamp
| From: | derick@php.net | Date: | Sun, 04 Sep 2005 18:04:52 +0000 |
| Subject: | #34052 [Ver]: date('U') returns %ld not unix timestamp | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84505@lists.php.net to get a copy of this message | ||
ID: 34052
Updated by: derick@php.net
Reported By: ash at theleys dot net
Status: Verified
Bug Type: Date/time related
Operating System: windows
PHP Version: 5.1RC1
New Comment:
We (should) use PHP's internal printing routines, this has nothing to
do with the platform. It works fine here.
Previous Comments:
------------------------------------------------------------------------
[2005-09-04 19:58:44] nlopess@php.net
Bah, forget my last post.
As timelib_sll is defined as __int64, we should use printf(%I64d) on
windows.
------------------------------------------------------------------------
[2005-09-04 19:01:29] ash at theleys dot net
Hi, have tried snapshot. Still same. date('u') on PHP 4.3 still works
(on another server) on IIS6 (so Windows Server 2003).
Thanks for looking in to this, Alan
------------------------------------------------------------------------
[2005-09-04 14:56:31] nlopess@php.net
Yep, I can reproduce this on windows.
This seems to be a microsoft bug, because it %ld is stated as
supported:
http://msdn.microsoft.com/library/en-us/vclib/html/_crt_format_specification_fields_.2d_.printf_and_wprintf_functions.asp
------------------------------------------------------------------------
[2005-09-04 14:52:54] derick@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Please try the snapshot then.
------------------------------------------------------------------------
[2005-09-04 14:00:04] ash at theleys dot net
Tried again with RC1 and same result. time() WORKS correctly. date('U')
still returns %ld. Can not try CVS as I can't build PHP from source,
hence waited for RC1.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34052
--
Edit this bug report at http://bugs.php.net/?id=34052&edit=1