Title: RSS timezone issue
Last modified: August 18, 2016

---

# RSS timezone issue

 *  [davesgonechina](https://wordpress.org/support/users/davesgonechina/)
 * (@davesgonechina)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/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?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [davesgonechina](https://wordpress.org/support/users/davesgonechina/)
 * (@davesgonechina)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/rss-timezone-issue/#post-34585)
 * whoops, I was wrong. That’s not the right section. My posts display the right
   time, the RSS feed does not – now I think it’s somewhere in the code of templates_functions.
   php, like in the_time function cuz RSS appears to use that.
    function the_time(
   $d=”, $echo = true) { global $id, $post, $timeformat; if ($d==”) { $the_time 
   = mysql2date($timeformat, $post->post_date); } else { $the_time = mysql2date(
   $d, $post->post_date); } $the_time = apply_filters(‘the_time’, $the_time); if(
   $echo) { echo $the_time; } else { return $the_time; } Shouldn’t this incorporate
   time_difference? Is it already incorporated in the post_date? Why then does my
   feed say it’s a day off to everyone else? My page: [http://silkworms.chinesetriad.org](http://silkworms.chinesetriad.org)
   The blog aggregator that this is a problem for: [http://www.livinginchina.com/aggregator.shtml](http://www.livinginchina.com/aggregator.shtml)
 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/rss-timezone-issue/#post-35107)
 * Did you make any progress on this? I’d love to let each post properly reflect
   the time and timezone of the person posting, so it doesn’t look like I’m posting
   at 2am if I’m outside the US.
 *  [chedong](https://wordpress.org/support/users/chedong/)
 * (@chedong)
 * [21 years ago](https://wordpress.org/support/topic/rss-timezone-issue/#post-35132)
 * RSS time zone issue: GMT time + GMT time zone or local time + local time zone
 * I subscribe some feed published by wordpress: I found the timezone problem. the
   post always shown published tomorrow.
 * current wordpress default pubDate field is localtime + GMT timezone:
    <pubDate
   >Wed, 25 May 2005 09:32:44 +0000</pubDate> but feed publish in China: it should
   be <pubDate>Wed, 25 May 2005 09:32:44 +0800</pubDate> or convert time to GMT 
   and +0000 <pubDate>Wed, 25 May 2005 01:32:44 +0000</pubDate>
 * Thanks
 * Che Dong
    [http://www.chedong.com](http://www.chedong.com)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘RSS timezone issue’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [chedong](https://wordpress.org/support/users/chedong/)
 * Last activity: [21 years ago](https://wordpress.org/support/topic/rss-timezone-issue/#post-35132)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
