I am trying to create a rss feed from a web page. I am able to get the data to create the title, but I am trying to get the date updated correctly. There is a string on the page, that tells what time of day the news was reported, such as "Time of Report: 1pm". So how can I get the "1pm" and convert that to a date string that contains the current date, with this time? Thanks, CP
A:
The Pipes "Date Builder" module is surprisingly powerful.
You can actually feed it a string like "1pm" and it will return:
hour21
timezoneUTC
second0
month1
minute0
utime1264021200
day20
day_of_week3
year2010
The date is relative to when you run it - in this case it assumes "1pm Today". The result is "hour21" in UTC because it parsed in Yahoo's time-zone. So if you need something specific, use the "Sting Builder" to append the time-zone. For example "1pm GMT" gives:
hour13
timezoneUTC
second0
month1
minute0
utime1263992400
day20
day_of_week3
year2010
Obviously you may run into issues if your pipe runs after a date change - an "11pm" entry could easily be read the following morning, leading to inaccurate results.
Gavin Brock
2010-01-21 01:21:32
Ok that is close, but how do I get the text from an item and pipe it to the data builder input?
CptanPanic
2010-01-21 13:18:50
Ok I half figured it out using a Loop, with a Date Builder inside.
CptanPanic
2010-01-21 15:36:10