Welcome to WebmasterWorld Guest from 54.147.158.215

Forum Moderators: eljefe3 & skibum

Message Too Old, No Replies

Changing time zone in eBay RSS feeds

It's stuck on PDT

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

Junior Member

10+ Year Member

joined:Nov 22, 2003
posts:69
votes: 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.

TIA

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

New User

10+ Year Member

joined:June 25, 2005
posts:5
votes: 0


When I do ebay queries, the times are always in UTC, and then I convert as necessary from there.
9:35 am on July 6, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 22, 2003
posts:69
votes: 0


OK, I suspect it's my parser then, thanks
5:39 pm on July 11, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 22, 2003
posts:69
votes: 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 July 11, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Oct 1, 2002
posts:5199
votes: 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 July 11, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Oct 1, 2002
posts:5199
votes: 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!

Suzy

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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members