RSS timezone issue
-
My server is in the U.S., I’m in China. Though my posts have a China timestamp (i.e. 8pm), my RSS feed have a U.S. timestamp(8a.m.). It’s causing problems with people sorting through the feed, since it makes it look like I wrote something 12 hours in the future. I think something must change here:
<?php /* These first lines are the first part of a CafeLog template.
In every template you do, you got to copy them before the CafeLog ‘loop’ */
$blog = 1; // enter your blog’s ID
$doing_rss = 1;
header(‘Content-type: text/xml’, true);
require(‘wp-blog-header.php’);
// Get the time of the most recent article
$maxdate = $wpdb->get_var(“SELECT max(post_date) FROM $tableposts”);
$unixtime = strtotime($maxdate);
// format timestamp for Last-Modified header
$clast = gmdate(“D, d M Y H:i:s \G\M\T”, $unixtime);
$cetag = (isset($clast)) ? md5($clast) : ”;
Any advice?
- The topic ‘RSS timezone issue’ is closed to new replies.