From 21293bbae0e8646ce1b20fb55c7587d392341bae Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Mon, 11 Nov 2013 15:25:00 +0800 Subject: [PATCH] MDL-42808 library: Google API was resetting the timezone --- lib/google/Google_Client.php | 3 ++- lib/google/readme_moodle.txt | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/google/Google_Client.php b/lib/google/Google_Client.php index e6026a1a3b6..3e12137a8da 100644 --- a/lib/google/Google_Client.php +++ b/lib/google/Google_Client.php @@ -30,7 +30,8 @@ if (! function_exists('http_build_query')) { } if (! ini_get('date.timezone') && function_exists('date_default_timezone_set')) { - date_default_timezone_set('UTC'); + // Library hack. See MDL-42808. + // date_default_timezone_set('UTC'); } // hack around with the include paths a bit so the library 'just works' diff --git a/lib/google/readme_moodle.txt b/lib/google/readme_moodle.txt index 946aa226b56..8bb8410de4a 100644 --- a/lib/google/readme_moodle.txt +++ b/lib/google/readme_moodle.txt @@ -10,6 +10,12 @@ that was that we could force Google lib to use our implementation of curl. If you upgrade the library, please check if the method Google_CurlIO::makeRequest() has been updated and would require change in moodle_google_curlio. +Library hack +------------ + +* The file Google_Client.php resets the timezone to UTC. The line + date_default_timezone_set('UTC'); should be commented out. See MDL-42808. + Information -----------