Edit report at http://bugs.php.net/bug.php?id=36338&edit=1
ID: 36338 Comment by: dosergio at ig dot com dot br Reported by: carsten dot moldenhauer at mailbox dot tu-dresden dot d Summary: Integer Timestamps are not enough! Status: Bogus Type: Bug Package: Date/time related Operating System: Linux PHP Version: 5.1.2 Block user comment: N Private report: N New Comment: "This is OS limitation and PHP has nothing to do with it." I disagree. The limitation occurs because the argument is an integer. If PHP used double for instance, the limitation would not exist. Inside the function they could apply round(double) that would return a LONG instead of using a OS limited integer. I Suggest the developers to think about using double argument and round it inside the function to obtain a LONG INTEGER. Previous Comments: ------------------------------------------------------------------------ [2006-02-10 13:12:12] der...@php.net Also the new date/time functionality does support 64 bits... except that it's not enabled yet ------------------------------------------------------------------------ [2006-02-09 14:51:25] tony2...@php.net This is OS limitation and PHP has nothing to do with it. ------------------------------------------------------------------------ [2006-02-09 12:27:36] carsten dot moldenhauer at mailbox dot tu-dresden dot d Description: ------------ Hello PHP Team. I recently discovered a problem with standard timestamps. They are stored as integers. Integers have a range up to 2147483647. date( "Y-m-d H:i:s", 2147483647 ) results in: 2038-01-19 04:14:07 If you got a date after 2038 in text format and want to convert it to integer, you will get back 2147483647. So you are back in 2038 again. I would dislike to see all the time related PHP applications break on the above date. Is there any possibility to switch timestamps to long? (btw, the same occurs with dates before 1901-12-13 21:45:52 which is date( "Y-m-d H:i:s, -2147483648 )) I am looking forward to your answers. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=36338&edit=1