cvs: phpweb /include prepend.inc
| From: | Hannes Magnusson | Date: | Fri, 30 Jan 2009 11:45:54 +0000 |
| Subject: | cvs: phpweb /include prepend.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-3691@lists.php.net to get a copy of this message | ||
bjori Fri Jan 30 11:45:54 2009 UTC
Modified files:
/phpweb/include prepend.inc
Log:
Set timezone if php.ini is configured incorrectly
http://cvs.php.net/viewvc.cgi/phpweb/include/prepend.inc?r1=1.39&r2=1.40&diff_format=u
Index: phpweb/include/prepend.inc
diff -u phpweb/include/prepend.inc:1.39 phpweb/include/prepend.inc:1.40
--- phpweb/include/prepend.inc:1.39 Sun Feb 24 22:16:44 2008
+++ phpweb/include/prepend.inc Fri Jan 30 11:45:54 2009
@@ -1,6 +1,6 @@
<?php // -*- C++ -*-
-// $Id: prepend.inc,v 1.39 2008/02/24 22:16:44 bjori Exp $
+// $Id: prepend.inc,v 1.40 2009/01/30 11:45:54 bjori Exp $
// See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
// for cache control header descriptions (used in many places on the site).
@@ -10,6 +10,11 @@
header("Content-language: en");
header("Content-type: text/html; charset=utf-8");
+// Be 100% sure the timezone is set
+if (ini_get("date.timezone") === "" &&
function_exists("date_default_timezone_set")) {
+ date_default_timezone_set("UTC");
+}
+
// Prevent cross site scripting problems
unset($RSIDEBAR_DATA);
unset($SIDEBAR_DATA);