Welcome to WebmasterWorld Guest from 54.166.220.138

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)

10+ Year Member



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 Jul 5, 2006 (gmt 0)

10+ Year Member



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)

10+ Year Member



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

10+ Year Member



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)

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



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)

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



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]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month