Skip to content

Commit

Permalink
Do not translate dates in feeds. http://mosquito.wordpress.org/view.p…
Browse files Browse the repository at this point in the history
…hp?id=924.  Reviewed by morganiq.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Feb 21, 2005
1 parent c567fcc commit 810bf22
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions wp-atom.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<title><?php bloginfo_rss('name') ?></title> <title><?php bloginfo_rss('name') ?></title>
<link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" /> <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
<tagline><?php bloginfo_rss("description") ?></tagline> <tagline><?php bloginfo_rss("description") ?></tagline>
<modified><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></modified> <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')); ?></copyright> <copyright>Copyright <?php echo mysql2date('Y', get_lastpostdate('blog'), 0); ?></copyright>
<generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator> <generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>


<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
Expand Down
4 changes: 2 additions & 2 deletions wp-includes/functions.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ function get_profile($field, $user = false) {
return $wpdb->get_var("SELECT $field FROM $wpdb->users WHERE user_login = '$user'"); 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; global $month, $weekday, $month_abbrev, $weekday_abbrev;
$m = $mysqlstring; $m = $mysqlstring;
if (empty($m)) { if (empty($m)) {
return false; 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)); $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 = $month[date('m', $i)];
$datemonth_abbrev = $month_abbrev[$datemonth]; $datemonth_abbrev = $month_abbrev[$datemonth];
$dateweekday = $weekday[date('w', $i)]; $dateweekday = $weekday[date('w', $i)];
Expand Down
4 changes: 2 additions & 2 deletions wp-rdf.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<title><?php bloginfo_rss('name') ?></title> <title><?php bloginfo_rss('name') ?></title>
<link><?php bloginfo_rss('url') ?></link> <link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss('description') ?></description> <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 ?>"/> <admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
<sy:updatePeriod>hourly</sy:updatePeriod> <sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency> <sy:updateFrequency>1</sy:updateFrequency>
Expand All @@ -42,7 +42,7 @@
<item rdf:about="<?php permalink_single_rss() ?>"> <item rdf:about="<?php permalink_single_rss() ?>">
<title><?php the_title_rss() ?></title> <title><?php the_title_rss() ?></title>
<link><?php permalink_single_rss() ?></link> <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> <dc:creator><?php the_author() ?></dc:creator>
<?php the_category_rss('rdf') ?> <?php the_category_rss('rdf') ?>
<?php if (get_settings('rss_use_excerpt')) : ?> <?php if (get_settings('rss_use_excerpt')) : ?>
Expand Down
2 changes: 1 addition & 1 deletion wp-rss.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<title><?php bloginfo_rss('name') ?></title> <title><?php bloginfo_rss('name') ?></title>
<link><?php bloginfo_rss('url') ?></link> <link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss('description') ?></description> <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> <docs>http://backend.userland.com/rss092</docs>
<language><?php echo get_option('rss_language'); ?></language> <language><?php echo get_option('rss_language'); ?></language>


Expand Down
4 changes: 2 additions & 2 deletions wp-rss2.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<title><?php bloginfo_rss('name'); ?></title> <title><?php bloginfo_rss('name'); ?></title>
<link><?php bloginfo_rss('url') ?></link> <link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss("description") ?></description> <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> <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
<language><?php echo get_option('rss_language'); ?></language> <language><?php echo get_option('rss_language'); ?></language>


Expand All @@ -33,7 +33,7 @@
<title><?php the_title_rss() ?></title> <title><?php the_title_rss() ?></title>
<link><?php permalink_single_rss() ?></link> <link><?php permalink_single_rss() ?></link>
<comments><?php comments_link(); ?></comments> <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> <dc:creator><?php the_author() ?></dc:creator>
<?php the_category_rss() ?> <?php the_category_rss() ?>


Expand Down

0 comments on commit 810bf22

Please sign in to comment.