|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-03-14 19:27 UTC] rasmus@php.net
-Status: Open
+Status: Feedback
[2011-03-14 19:27 UTC] rasmus@php.net
[2011-03-14 19:36 UTC] derick@php.net
-Status: Feedback
+Status: Bogus
[2011-03-14 19:36 UTC] derick@php.net
[2011-03-15 13:01 UTC] maciej at wiercinski dot net
[2011-03-15 18:52 UTC] seanius at debian dot org
[2011-03-16 18:56 UTC] johannes@php.net
[2011-03-16 22:52 UTC] maciej at wiercinski dot net
[2011-03-16 22:56 UTC] rasmus@php.net
[2011-03-17 00:02 UTC] maciej at wiercinski dot net
[2011-03-17 00:10 UTC] rasmus@php.net
[2011-03-17 00:13 UTC] maciej at wiercinski dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 22:00:01 2025 UTC |
Description: ------------ Upon first call to date_default_timezone_set, PHP syscalls stat() on all the files in /usr/share/zoneinfo. It can be easily checked by running: $ strace -s 100 -r php -n -r"date_default_timezone_set('GMT');" 2>&1 | grep zoneinfo On average Debian/Ubuntu system it accounts for little over 600 syscalls. Reproduced on: PHP 5.3.5-1 with Suhosin-Patch (cli) (built: Feb 19 2011 01:57:59) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 4 2010 03:25:57) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans PHP 5.3.2-1ubuntu4.7 with Suhosin-Patch (cli) (built: Jan 12 2011 18:36:08) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans *Not* reproduced on: PHP 5.3.3-0.dotdeb.1 with Suhosin-Patch (cli) (built: Oct 1 2010 08:49:29) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH Test script: --------------- $ strace -s 100 -r php -n -r"date_default_timezone_set('GMT');" 2>&1 | grep zoneinfo | head -10 0.000190 open("/usr/share/zoneinfo/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3 0.000046 stat64("/usr/share/zoneinfo//localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0 0.000112 stat64("/usr/share/zoneinfo//Zulu", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0 0.000101 stat64("/usr/share/zoneinfo//WET", {st_mode=S_IFREG|0644, st_size=1873, ...}) = 0 0.000100 stat64("/usr/share/zoneinfo//W-SU", {st_mode=S_IFREG|0644, st_size=2194, ...}) = 0 0.000098 stat64("/usr/share/zoneinfo//Universal", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0 0.000101 stat64("/usr/share/zoneinfo//UTC", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0 0.000099 stat64("/usr/share/zoneinfo//US", {st_mode=S_IFDIR|0755, st_size=352, ...}) = 0 0.000097 stat64("/usr/share/zoneinfo//UCT", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0 0.000099 stat64("/usr/share/zoneinfo//Turkey", {st_mode=S_IFREG|0644, st_size=2721, ...}) = 0 $ strace -s 100 -r php -n -r"date_default_timezone_set('GMT');" 2>&1 | grep zoneinfo | wc -l 626