Please move this to a suitable forum, can’t seem to get any help with it!
Situation:
PHP server time and EE localization time are at the same values now (that was a bugger, had to figure that out!)
I have a php variable that has the present time, - 3 hours. I want to compare this time to the entry date of whatever entries have been inserted into the weblog. So, if entry_date > $pastTime, display an icon or asterix. This works! I use php within the weblog entries to show it.
Issue: - Some feeds do not give a specific entry time of each article, while some do. Not having a time value makes it very difficult to compare times - The “pubDate” values are obviously the dates from the feeds, not the actual time that FeedGrab inserted the entry into my weblog. This also makes it very difficult to compare times. - Date formating - i don’t know what should be formatted to a certain date or what should not be, or if it even matters, when it comes down to comparing number values
Solution?: (This is what I need your help with!) The following is the feedgrab plugin code..
{exp:feedgrab url="http://www.yoursite.com/news/rss.php"
weblog="9"
category="7"
title="title"
date="pubDate"
use="link|description"
fields="feed_url|feed_desc"
unique="feed_url"}
What I am hoping someone can help me with, is to find a way to instead of having to use this.
date="pubDate"
I would like to be able to do something that would insert the current time (my server time, which is already setup) of when feedgrab inserted the entry into the weblog, into the date field, instead of the feed items pubDate.
I’ve tried things such as.. (keep in my mind this is not my strong suit)
date="{current_time format="%m/%d/%y %h:%i %a"}"
date="{current_time}"
I have also tried using straight php to insert the current time, but that didnt work either.
I’m sure I’ve screwed the code up somewhere while testing, but the results have always been there are no correct dates inserted into the date field, when I try using any one of those ideas.
Anyone have any ideas?
Thanks
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.