homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Advertising / Affiliates
Forum Library, Charter, Moderators: eljefe3 & skibum

Affiliates Forum

Changing time zone in eBay RSS feeds
It's stuck on PDT

 7:41 pm on Jul 4, 2006 (gmt 0)

I'm using the advanced search method to get feeds of auctions ending soon at each country's eBay, and when I parse it in my page the time always comes up as PDT regardless of which site I got the feed from.

There's no obvious option for changing it in the form, and I need to make the UK feed show up in BST and so on. Changing it to show the time left would also work for me if that's any easier to do.




 7:45 pm on Jul 5, 2006 (gmt 0)

When I do ebay queries, the times are always in UTC, and then I convert as necessary from there.


 9:35 am on Jul 6, 2006 (gmt 0)

OK, I suspect it's my parser then, thanks


 5:39 pm on Jul 11, 2006 (gmt 0)

Well, I've had a closer look at this and it looks like the time is part of the description rather than it's own field.

It has its own field as well, but changing it to something human is beyond my skills I think. I'm emailing the eBay UK person from my welcome message to see if they have any ideas.


 6:13 pm on Jul 11, 2006 (gmt 0)

I managed this with my limited PHP skills.. hang on and I'll see if I can find the function that did it, and perhaps someone can make it better.


 6:26 pm on Jul 11, 2006 (gmt 0)

hehe.. I can't remember what I did now, but it looks like I parsed out the UNIX timestamp from the
endtime variable, by stripping the last three digits, then just used the date function to convert it, assigning it to a variable at the same time

$endtime = $item['rx']['endtime'];
$endtime = substr($endtime, 0, 10);
$endtime = date("l M d, Y [H:i:s]", $endtime);

Then I used a preg replace to strip the PDT time from the description and replace with my custom code and variable instead..

$description = $item['description'];
$description = preg_replace('(<br /> End Date:.+PDT<br />)', '<strong>Sale Ends:</strong> ' . $endtime . '<br /><br />', $description);

Do let me know if your manager tells you an easier way!


[edited by: SuzyUK at 6:28 pm (utc) on July 11, 2006]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Advertising / Affiliates
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved