[wp-hackers] Feed date format and locale not using blog settings. Bug or feature?

Bjorn Wijers burobjorn at gmail.com
Wed Feb 11 10:40:26 GMT 2009


Hi,

It seems that Wordpress does not use the date format settings as set in de admin
interface (/wp-admin/options-general.php).

Instead it uses some hardcoded value in for example feed-rss2.php:

<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000',
get_lastpostmodified('GMT'), false); ?></pubDate>

Is there a reason why it is hardcoded?

It also seems that the locale is not being used in this. It seems it defaults to
English. I would expect it to use the current set locale. So for Dutch it would
use the Dutch locale instead of the English one. Now we get a date/time format
in English even when the locale is set to Dutch. AFAIK no bug report exists for
this issue.

I would suggest to use the date_format and time_format options as set per blog
(thinking of WPMU as well) in the (/wp-admin/options-general.php). In order to
localize time/date I suggest we use the setlocale() function in combination with
strftime() function instead of date().

I'm willing to create a patch for this, but I would like to know if the proposed
solution would work out and make sure I'm not missing anything. So any feedback
on this is much appreciated.

ps: I have not yet created a ticket for this. I want to know for sure this is a
bug and not a feature.

All the best,

grtz
BjornW

-- 

met vriendelijke groet,
Bjorn Wijers

* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship

Concordiastraat 68-126
3551 EM Utrecht
The Netherlands

phone: +31 6 49 74 78 70
http://www.burobjorn.nl



More information about the wp-hackers mailing list