#22764 [Bgs]: date() fails to negative timestamps
| From: | georg@php.net | Date: | Wed, 19 Mar 2003 11:31:38 +0000 |
| Subject: | #22764 [Bgs]: date() fails to negative timestamps | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35924@lists.php.net to get a copy of this message | ||
ID: 22764
Updated by: georg@php.net
Reported By: lahme at 4all-networks dot de
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux
PHP Version: 4.3.2RC1
New Comment:
Thanks,
but we already know the content of the manual! Please read carefully
what Ilia wrote!
Previous Comments:
------------------------------------------------------------------------
[2003-03-18 12:05:43] lahme at 4all-networks dot de
@iliaa ...
i copied this from the manual... so it IS a BUG!!!!
"date -- Format a local time/date
Description
string date ( string format [, int timestamp])
Returns a string formatted according to the given format string using
the given integer timestamp or the current local time if no timestamp
is given. In otherwords, timestamp is optional and defaults to the
value of time().
Note: The valid range of a timestamp is typically from Fri, 13 Dec 1901
20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates
that correspond to the minimum and maximum values for a 32-bit signed
integer). On windows this range is limited from 01-01-1970 to
19-01-2038.
To generate a timestamp from a string representation of the date, you
may be able to use strtotime(). Additionally, some databases have
functions to convert their date formats into timestamps (such as
MySQL's UNIX_TIMESTAMP function). "
------------------------------------------------------------------------
[2003-03-18 09:17:26] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Certain libc implementations do not support negative timestamps.
------------------------------------------------------------------------
[2003-03-18 07:28:31] lahme at 4all-networks dot de
if you´ve saved negative timestamp in a database and put it on frontend
by date("d.m.Y",$timestamp); you will only see the 1.1.1970 ..
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22764&edit=1