com web/php: Set the timezone: images/logo.php
| From: | Hannes Magnusson | Date: | Mon, 09 Dec 2013 17:08:59 +0000 |
| Subject: | com web/php: Set the timezone: images/logo.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17445@lists.php.net to get a copy of this message | ||
Commit: 5c9a0902007fa8940ff73fead3893a2cdec7301a
Author: Hannes Magnusson <bjori@mongodb.com> Mon, 9 Dec 2013 09:08:59 -0800
Parents: 206aab8bf2a0fff87e5453eaeb4545bacd63ee36
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=5c9a0902007fa8940ff73fead3893a2cdec7301a
Log:
Set the timezone
Changed paths:
M images/logo.php
Diff:
diff --git a/images/logo.php b/images/logo.php
index 14b8841..340160d 100644
--- a/images/logo.php
+++ b/images/logo.php
@@ -19,6 +19,11 @@ function imgheader($filename) {
header("Content-Type: " . $hdr);
}
+// Be 100% sure the timezone is set
+if (ini_get("date.timezone") === "" &&
function_exists("date_default_timezone_set")) {
+ date_default_timezone_set("UTC");
+}
+
$now = $_SERVER["REQUEST_TIME"];
$logos = array(
"./logos/php-logo@2x.png",