From: vinicius at teracom dot com dot br Operating system: Red Hat 8.0 PHP version: 4.3.4 PHP Bug Type: Date/time related Bug description: Getting unixtime since 12/31/1969 21:00:00
Description: ------------ I was testing unixtime from php and delphi and there is a difference from one to another. Php makes unixtime from 12/31/1969 21:00:00. Isn't it a bug? Unixtime isn't from 01/01/1970 00:00:00 as you say in manual from function strtotime: '...This means that e.g. dates prior to Jan 1, 1970 will not work on Windows, some Linux distributions, and a few other operating systems....' If it's because the time, isn't it needed another argument to define it? For example: If i make a script using unixtime using -0300 timezone and, for some reason, i move it to another system that uses timezone as GMT, some results will be different. Reproduce code: --------------- <? $unixtime = 0; echo date("d/m/Y H:i:s", $unixtime) . "\r\n"; ?> Expected result: ---------------- 01/01/1970 00:00:00 Actual result: -------------- 31/12/1969 21:00:00 -- Edit bug report at http://bugs.php.net/?id=28399&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28399&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28399&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28399&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28399&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28399&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28399&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28399&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28399&r=support Expected behavior: http://bugs.php.net/fix.php?id=28399&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28399&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28399&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28399&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28399&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28399&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28399&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28399&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28399&r=float