#36818 [Opn->Csd]: time() returns UTC time instead of local time

From: Date: Wed, 22 Mar 2006 03:24:25 +0000
Subject: #36818 [Opn->Csd]: time() returns UTC time instead of local time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94742@lists.php.net to get a copy of this message
ID: 36818 User updated by: liber at iproom dot com Reported By: liber at iproom dot com -Status: Open +Status: Closed Bug Type: *General Issues Operating System: Windows XP PHP Version: 5.1.2 New Comment: can use date_default_timezone_set() to solve this problem. Previous Comments: ------------------------------------------------------------------------ [2006-03-22 04:05:24] liber at iproom dot com Description: ------------ time() On Windows XP: it will shows UTC time. On Linux: it will shows local time correctly. Reproduce code: --------------- echo date("Y-m-d H:i:s",time()); Expected result: ---------------- return local time Actual result: -------------- return UTC time ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36818&edit=1

« previous php.bugs (#94742) next »