]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12596 Timezone problem in PHPMailer RFCDate() Function - patch submitted by Leo...
authorskodak <skodak>
Sun, 16 Dec 2007 14:50:58 +0000 (14:50 +0000)
committerskodak <skodak>
Sun, 16 Dec 2007 14:50:58 +0000 (14:50 +0000)
lib/phpmailer/README_MOODLE.txt
lib/phpmailer/class.phpmailer.php

index c60713f4f05eeb3c7c1f28d41820d11e04b29073..a45eea5dc90812b9b97e99cd9e771cd707639147 100644 (file)
@@ -7,8 +7,17 @@ Moodle-specific changes to phpmailer are tracked here.
   Date: 14 Feb 2007
   Reason: http://tracker.moodle.org/browse/MDL-3681
 
+
   lib/phpmailer/class.phpmailer.php
 
   Changed by skodak
   Date 12 Mar 2007
-  Reason: support for gb18030
\ No newline at end of file
+  Reason: support for gb18030
+
+
+  lib/phpmailer/class.phpmailer.php
+
+  Changed by skodak
+  Date 15 Dec 2007
+  Reason: MDL-12596 - correct timezone in date
+  
\ No newline at end of file
index 6b2603563fa5147274a4b006a07f96ba32e33f5d..8115b5d47490a44c54d79c7d9cb8bc479e5e420e 100644 (file)
@@ -1469,7 +1469,7 @@ class PHPMailer
         $tz = date("Z");
         $tzs = ($tz < 0) ? "-" : "+";
         $tz = abs($tz);
-        $tz = ($tz/3600)*100 + ($tz%3600)/60;
+        $tz = (($tz - ($tz%3600) )/3600)*100 + ($tz%3600)/60; // moodle change - MDL-12596
         $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz);
 
         return $result;