|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-14 15:34 UTC] iliaa@php.net
[2004-05-14 15:49 UTC] mgf@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Feb 04 15:00:01 2026 UTC |
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