|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61350 date.timezone retrieval in APC, with php >= v5.4.0, requires update
Submitted: 2012-03-11 17:36 UTC Modified: 2012-03-12 07:35 UTC
From: locuse at mm dot st Assigned:
Status: Not a bug Package: APC (PECL)
PHP Version: 5.4SVN-2012-03-11 (SVN) OS: linux x86_64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: locuse at mm dot st
New email:
PHP Version: OS:


 [2012-03-11 17:36 UTC] locuse at mm dot st

	php -v
		PHP 5.4.1RC1-dev (cli) (built: Mar 10 2012 20:21:53)

with apc/trunk,

	svn info
		Path: apc
		Repository Root:
		Repository UUID: c90b9560-bf6c-de11-be94-00142212c4b1
		Revision: 324111

built & enabled,

	php -i | grep -i apc | grep Support
		APC Support => enabled

and timezone settings set in php.ini

	php -i | grep -i timezone
		"Olson" Timezone Database Version => 2012.2
		Timezone Database => internal
		Default timezone => America/Los_Angeles
		date.timezone => America/Los_Angeles => America/Los_Angeles

at nav to,


displays "Warning: date()",

	Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /srv/www/localhost/apc.php on line 807

reading @ 'date_default_timezone_get' changelog,

		5.4.0 	The TZ environment variable is no longer used to guess the timezone.
		5.4.0 	The timezone is no longer guessed from information available through the operating system as the guessed timezone can not be relied on.

looks like apc's timezone check needs to be perhaps updated for php v5.4.0+ compatibility?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-12 07:35 UTC]
Please be sure that you have correctly set the TZ in your php.ini and that the 
right php.ini is loaded by PHP (CLI or using your webserver).

The line 807 in apc.php is a simple call to the date() functon, which requires now 
to have a correct TZ set.
 [2012-03-12 07:35 UTC]
-Status: Open +Status: Not a bug
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 17 06:01:28 2024 UTC