Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Do not translate dates in feeds. http://mosquito.wordpress.org/view.p…

…hp?id=924.  Reviewed by morganiq.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 810bf22215745ceae75a6b563feaad31bc4a25b1 1 parent c567fcc
ryan authored
4 wp-atom.php
View
@@ -20,8 +20,8 @@
<title><?php bloginfo_rss('name') ?></title>
<link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
<tagline><?php bloginfo_rss("description") ?></tagline>
- <modified><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></modified>
- <copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog')); ?></copyright>
+ <modified><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></modified>
+ <copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog'), 0); ?></copyright>
<generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
4 wp-includes/functions.php
View
@@ -15,14 +15,14 @@ function get_profile($field, $user = false) {
return $wpdb->get_var("SELECT $field FROM $wpdb->users WHERE user_login = '$user'");
}
-function mysql2date($dateformatstring, $mysqlstring, $use_b2configmonthsdays = 1) {
+function mysql2date($dateformatstring, $mysqlstring, $translate = true) {
global $month, $weekday, $month_abbrev, $weekday_abbrev;
$m = $mysqlstring;
if (empty($m)) {
return false;
}
$i = mktime(substr($m,11,2),substr($m,14,2),substr($m,17,2),substr($m,5,2),substr($m,8,2),substr($m,0,4));
- if (!empty($month) && !empty($weekday) && $use_b2configmonthsdays) {
+ if (!empty($month) && !empty($weekday) && $translate) {
$datemonth = $month[date('m', $i)];
$datemonth_abbrev = $month_abbrev[$datemonth];
$dateweekday = $weekday[date('w', $i)];
4 wp-rdf.php
View
@@ -25,7 +25,7 @@
<title><?php bloginfo_rss('name') ?></title>
<link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss('description') ?></description>
- <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></dc:date>
+ <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>
<admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
@@ -42,7 +42,7 @@
<item rdf:about="<?php permalink_single_rss() ?>">
<title><?php the_title_rss() ?></title>
<link><?php permalink_single_rss() ?></link>
- <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt); ?></dc:date>
+ <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
<dc:creator><?php the_author() ?></dc:creator>
<?php the_category_rss('rdf') ?>
<?php if (get_settings('rss_use_excerpt')) : ?>
2  wp-rss.php
View
@@ -18,7 +18,7 @@
<title><?php bloginfo_rss('name') ?></title>
<link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss('description') ?></description>
- <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), 0); ?></lastBuildDate>
+ <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
<docs>http://backend.userland.com/rss092</docs>
<language><?php echo get_option('rss_language'); ?></language>
4 wp-rss2.php
View
@@ -24,7 +24,7 @@
<title><?php bloginfo_rss('name'); ?></title>
<link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss("description") ?></description>
- <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), 0); ?></pubDate>
+ <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
<generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
<language><?php echo get_option('rss_language'); ?></language>
@@ -33,7 +33,7 @@
<title><?php the_title_rss() ?></title>
<link><?php permalink_single_rss() ?></link>
<comments><?php comments_link(); ?></comments>
- <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_the_time('Y-m-d H:i:s')); ?></pubDate>
+ <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_the_time('Y-m-d H:i:s'), false); ?></pubDate>
<dc:creator><?php the_author() ?></dc:creator>
<?php the_category_rss() ?>
Please sign in to comment.
Something went wrong with that request. Please try again.