[wp-hackers] Feed date format and locale not using blog settings.
Bug or feature?
wordpress at dd32.id.au
Wed Feb 11 11:39:11 GMT 2009
Once again, No.
Simply for the fact, That Feed readers do not understand different
languages, The RSS spec (along with most other spec's and software) is
written with English as the common format..
If the spec makes no mention of it, Its not going to be supported by
implementations of it, I do see that people would want it shown in
their native tongue, IMO, Feed readers should be able to translate the
time from a english-centric date/time into the users custom format (or
I somewhat think Internationalisation might be something that would be
included in future spec's though.
2009/2/11 Bjorn Wijers <burobjorn at gmail.com>:
> Good point.
> I looked at the RSS spec and it refers to RFC822 which states (I glanced
> over it) that the current time/date format as used by Wordpress is the correct
> one. I've added this to the Codex. However as far as I know it doesn't
> mention anything on the localization of this? So my question on if this
> could/should be localized remains.
>  http://cyber.law.harvard.edu/rss/rss.html
>  http://asg.web.cmu.edu/rfc/rfc822.html
>  http://codex.wordpress.org/index.php?title=WordPress_Feeds&action=edit§ion=7
> All the best,
>> My understanding of this is that RSS/Atom/Etc define the type of date
>> representation which the parsers expect, RSS expects it in that
>> format.. So following the user-set options would cause incompatibility
>> with various feed readers who cant manually parse a odd date/time
>> 2009/2/11 Bjorn Wijers <burobjorn at gmail.com>:
>>> 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,
>>> 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
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers