We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

date and time in feedgrab

Development and Programming

John*'s avatar
John*
6 posts
16 years ago
John*'s avatar John*

Hi - I’m wondering if there’s a ‘server time’ type variable I can use with the feedgrab plug-in? I don’t want the pubDate from any of the feeds inserted as the date in a weblog, simply the time - my local time - the entry was created.

Any help or tips much appreciated

John

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
16 years ago
Robin Sowell's avatar Robin Sowell

I’m not up on Feed Grab, so you might want to post specific questions on that to the thread on the plugin. That said… you do specify the server timezone in ‘Admin- System Prefs- Localization’ as well as an offset if needed. However, that’s going to be part of the serialized array of config data- not easily pulled out.

In truth? I’d likely just alter the module/plugin. Shouldn’t be hard- assuming I understand what you’re up to. Take a look at the localization class- you’d use that to get the time to enter as entry date. Just use that instead of pubDate. But you’d be better off asking the author on the details, as I’m not up on how it works.

Want me to go ahead and shift this one to the proper forum and tweak the title?

       
John*'s avatar
John*
6 posts
16 years ago
John*'s avatar John*

Thanks for the help, I’ll have a look at the localization class now… shift this post by all means 😊

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
16 years ago
Robin Sowell's avatar Robin Sowell

Good deal- and I didn’t tweak title, as I figure it is a pretty good description. Like I say- I don’t believe it will be too difficult to do- I’m just not up on the code.

       
John*'s avatar
John*
6 posts
16 years ago
John*'s avatar John*

Hi Robin,

I’m still stumped on this unfortunately, I’m new to EE and have zero knowledge of PHP. A lowly designer.

Is there a walk-through example anywhere of what I would have to do? I tried setting the pubDate variable in the feedgrab code to a made-up term, at the suggestion of the plug-in developer, to see if EE would default to the server time for entries but it sets them at midnight everytime.

In my template which calls feedgrab it’s set up like so:

{exp:feedgrab url=”http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/football/rss.xml” weblog=”2” title=”title” use=”link|description” refresh=”1” date=”meep” fields=”rss-link|rss-body” unique=”rss-link” category=”bbc” }

With several RSS feeds being pulled in. Would I use the localization class at the top of this template and use a variable in each instance of feedgrab? Excuse my ignorance and I’m probably using the wrong terms too 😊

any help much appreciated

J

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.