I'm a complete neophyte when it come to coding. But I figured I would ask here since it is where the php experts hang out.
I've deduced that some php code is not handling the timestamps from my mobile phone in a proper fashion.
I use a Samsung D600 to email in my updates to my blog. All my posts show up on WordPress, but after having gone through the wp-mail.php all the timestamps are wrong.
They are 12 days, and some hours ahead of when they should be.
My phone's timestamp looks like this (I think)
Thu, 05 Oct 2006 18:01:42 -0500
Here is what it goes through
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, ',')) {
$ddate = trim(substr($ddate, strpos($ddate, ',')+1, strlen($ddate)));
}
$date_arr = explode(' ', $ddate);
$date_time = explode(':', $date_arr[3]);
$ddate_H = $date_time[0];
$ddate_i = $date_time[1];
$ddate_s = $date_time[2];
$ddate_m = $date_arr[1];
$ddate_d = $date_arr[0];
$ddate_Y = $date_arr[2];
for ($j=0; $j<12; $j++) {
if ($ddate_m == $dmonths[$j]) {
$ddate_m = $j+1;
}
}
$time_zn = intval($date_arr[4]) * 36;
$ddate_U = gmmktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y);
$ddate_U = $ddate_U - $time_zn;
$post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference);
$post_date_gmt = gmdate('Y-m-d H:i:s', $ddate_U);
}
After having gone through that, it always comes out 12 days ahead, and thus frustrates me. The only reason to have a mobile blog is to have instant updates.
Any ideas on how to fix this?