time of RSS items
-
I have read that WordPress, for old times sake, keeps everything running on the UTC timezone, in spite of what you specifiy in the settings.
Using the SimplePie code that is in core, fetching an RSS feed using fetch_feed(), the $item->get_date(‘G:i’) function comes up with the wrong time.
Frustrating as that maybe, I found out that starting with:
$timezone = date_default_timezone_get(); date_default_timezone_set('my time zone code');
and finishing with this:
date_default_timezone_set($timezone);
Gives the correct result.
I am not sure if this has any side effects, or if this is the right way to go about it.
Are there any plans to change things in such a way that everything works OK, without hacks like this? It is totally unexpected behaviour.
Can anyone shed some light on this?
Thanks in advance!
- The topic ‘time of RSS items’ is closed to new replies.