From 5b0fcdb50016ad7c69974dee47201e8b124d7499 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Wed, 19 May 2004 05:43:32 +0000 Subject: [PATCH] Timezone fix from Kimmo Suominen. git-svn-id: http://svn.automattic.com/wordpress/trunk@1313 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-mail.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-mail.php b/wp-mail.php index 91ee83c59..7ba9087be 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -5,6 +5,8 @@ require_once(ABSPATH.WPINC.'/class-pop3.php'); error_reporting(2037); +$time_difference = get_settings('gmt_offset'); + $pop3 = new POP3(); if (!$pop3->connect(get_settings('mailserver_url'), get_settings('mailserver_port'))) : @@ -40,7 +42,7 @@ for ($i=1; $i <= $count; $i++) : if ($bodysignal) { $content .= $line; } else { - if (preg_match('/Content-Type: /', $line)) { + if (preg_match('/Content-Type: /i', $line)) { $content_type = trim($line); $content_type = substr($content_type, 14, strlen($content_type)-14); $content_type = explode(';', $content_type); @@ -51,14 +53,14 @@ for ($i=1; $i <= $count; $i++) : $boundary = explode('"', $boundary); $boundary = $boundary[1]; } - if (preg_match('/Subject: /', $line)) { + if (preg_match('/Subject: /i', $line)) { $subject = trim($line); $subject = substr($subject, 9, strlen($subject)-9); if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $subject)) { $subject = wp_iso_descrambler($subject); } } - if (preg_match('/Date: /', $line)) { // of the form '20 Mar 2002 20:32:37' + if (preg_match('/Date: /i', $line)) { // of the form '20 Mar 2002 20:32:37' $ddate = trim($line); $ddate = str_replace('Date: ', '', $ddate); if (strpos($ddate, ',')) {