Permalink
Browse files

MDL-12596 Timezone problem in PHPMailer RFCDate() Function - patch su…

…bmitted by Leo Gaggl; backported from MOODLE_19_STABLE
  • Loading branch information...
1 parent cd26832 commit f6a9b4c9b8b1664c8d6ccb65a91319a91df8cd40 skodak committed Dec 16, 2007
Showing with 11 additions and 2 deletions.
  1. +10 −1 lib/phpmailer/README_MOODLE.txt
  2. +1 −1 lib/phpmailer/class.phpmailer.php
@@ -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
+ Reason: support for gb18030
+
+
+ lib/phpmailer/class.phpmailer.php
+
+ Changed by skodak
+ Date 15 Dec 2007
+ Reason: MDL-12596 - correct timezone in date
+
@@ -1469,7 +1469,7 @@ function RFCDate() {
$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;

0 comments on commit f6a9b4c

Please sign in to comment.