note 111624 added to function.date-default-timezone-set

From: Date: Sat, 09 Mar 2013 21:39:42 +0000
Subject: note 111624 added to function.date-default-timezone-set
Groups: php.notes 
Request: Send a blank email to php-notes+get-194009@lists.php.net to get a copy of this message
Regarding my post 3 years before: The performance impact seems to be caused by the fact that a log message is written if you do not set a timezone. And writing a log message to disk can take significantly longer than actually calculating date() or getdate() - esp. on systems with slow IO like the Windows machine I used 3 years ago. PHP 4 did not produce any log messages, and therefore was as fast as PHP5 with a timezone set. So if you run date() or getdate() a lot of times, this will cause a lot of log messages to be written to disk (if you did not disable them in your php.ini settings), which will take its time. So either use this function or set the ini-setting "date.timezone" to make things faster. (And have a look into your logfiles! Solving all those warnings will not only save you disk space but will also speed up your web application.) ---- Server IP: 69.147.83.199 Probable Submitter: 95.89.130.116 ---- Manual Page -- http://php.net/manual/en/function.date-default-timezone-set.php Edit -- https://master.php.net/note/edit/111624 Del: integrated -- https://master.php.net/note/delete/111624/integrated Del: useless -- https://master.php.net/note/delete/111624/useless Del: bad code -- https://master.php.net/note/delete/111624/bad+code Del: spam -- https://master.php.net/note/delete/111624/spam Del: non-english -- https://master.php.net/note/delete/111624/non-english Del: in docs -- https://master.php.net/note/delete/111624/in+docs Del: other reasons-- https://master.php.net/note/delete/111624 Reject -- https://master.php.net/note/reject/111624 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194009) next »