HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


main_rss <pubDate> parsing

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#70326 (In Topic #14885)
Avatar

Fan in action

Issue with 7.1 Beta 1

I am using main_rss in the right panel and I just noticed that the publish dates are completely wrong.

The original feed has the following :

 <pubDate>Sat, 11 Jun 2011 14:26:00 +0700</pubDate> 
It's then sent to Yahoo Pipes and becomes

 <pubDate>Sat, 11 Jun 2011 00:26:00 -0700</pubDate> 
This is okay as it still dispays the correct Date / Time
However when it displays in ocPortal it has now become

 <div class="page_subtitle_tagline">Posted 10 June 2011, 11:26 PM</div> 
My Site : Configuration is set to :

 (GMT+7:00) Bangkok,Hanoi, Jakarta 
so I would expect it to simply add 14 hours to the <pubDate> that is being parsed , whereas it's actually taking another 1 hour off.


In the main body, I have also used a custom news feed and here again 1 hour is being stripped from the value being presented and no notice taken regarding the site time locale in the configuration.

Google News is presenting

 <pubDate>Sun, 12 Jun 2011 02:27:29 GMT+00:00</pubDate>
 
and ocPortal is displaying

  <div class="page_subtitle_tagline">Posted 1:27 AM</div>  
  Any suggestions?  


Back to the top
 
Posted
Rating:
#70335
Avatar

Does this fix it?

Attachment
sources/rss.php
» Download: rss.php (24 Kb, 153 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70337
Avatar

Fan in action

I am afraid not. It's made it worse

Sat, 11 Jun 2011 14:26:00 +0700

has become

Posted 12 May 2011, 8:26 PM
Back to the top
 
Posted
Rating:
#70338
Avatar

take 2

Attachment
» Download: rss.php (24 Kb, 167 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70340
Avatar

Fan in action

On the right track, but I'm afraid not.

Sat, 11 Jun 2011 14:26:00 +0700

has become

Posted 10 June 2011, 5:26 PM



Note

Both these revisions corrected the 1hr mismatch in the time setting for the main body, but the +0700 is not being recognised, however this is probably because Google do not supply a fully RFC822 compliant pubDate. The following two examples are acceptable,

<pubDate>Wed, 02 Oct 2002 13:00:00 GMT</pubDate>

<pubDate>Wed, 02 Oct 2002 15:00:00 +0200</pubDate>

but Google News delivers the following:

<pubDate>Wed, 02 Oct 2002 15:00:00 GMT+0200</pubDate>

This is not compliant.


This is why I was asking in another thread about cloning blocks as main_rss could be copied to main_rss_google as a custom block and a php strreplace could be applied to tidy up their sloppy implementation of standards.

Also feedburner (another Google company) does not appear to supply an img alt attribute, so again main_rss_feedburner could then be adapted to make the site W3C compliant.



My reason for being so pedantic is that I have customers who now insist that the code on their site is w3c compliant, however they are willing to go html5 as long as it passes the experimental validator.


Last edit: by skygod
Back to the top
 
Posted
Rating:
#70349
Avatar

Another shot.

Attachment
» Download: rss.php (24 Kb, 160 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70363
Avatar

Fan in action

Going backwards I'm afraid - This breaks the site

Parse error: syntax error, unexpected T_ELSEIF in /home/skygodwe/domains/skygod-webservices.co.cc/public_html/
sources/rss.php
on line 653
Back to the top
 
Posted
Rating:
#70368
Avatar

Whoops, silly last minute change I did broke it.

Attachment
» Download: rss.php (24 Kb, 177 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70377
Avatar

Fan in action

 

Still not working as it should I'm sorry to report.

Displaying the feed in a feed reader gives the following correct status as I am in a GMT +07:00 timezone and there is no issue regarding Summertime settings as it stays at GMT +07:00 all year.

 Rightmove Pattaya
HS1283 - House for Sale
13 June 2011 16:02 
Looking at the View Source of that display, I see the following

<item>         
<title>HS1283 - House for Sale</title>         
<link>http://www.rightmovepattaya.com/property-in-detail/HOUSES-for-Sale-in-Jomtien-Reference:-HS1283/1288</link>
<description>Location : Jomtien&lt;br /&gt;Price : 11,900,000 Baht&lt;br /&gt;&lt;img src=&quot;http://www.rightmovepattaya.com/images_properties/20110613160103.jpg&quot; width=&quot;240&quot; height=&quot;180&quot; alt=&quot;Rightmove Pattaya Property Image&quot;/&gt;&lt;br /&gt;320 square metres&lt;br /&gt;4  Bedroom&lt;br /&gt;6 Bathroom</description>
<guid isPermaLink="false">http://www.rightmovepattaya.com/property-in-detail/HOUSES-for-Sale-in-Jomtien-Reference:-HS1283/1288</guid>
<pubDate>Mon, 13 Jun 2011 02:02:54 -0700</pubDate>
</item>
 However the display in ocPortal is :
 
Back to the top
 
Posted
Rating:
#70382
Avatar

Take 4. This time I put my computer into Hong Kong time and tested with a Hong Kong feed, and it correctly converted to GMT internally then back to Hong Kong for my viewing. So fingers crossed…

Attachment
» Download: rss.php (24 Kb, 176 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70390
Avatar

Fan in action

Chris,

I appreciate the effort that you have expended, but it's still not working correctly.

Let me test some scenarios based on Workstation Time / ocPortal Timexone and I'll report back in this thread.

For the customer I'm looking to migrate from a no longer supported php Estate Agent framework, this is an important feature, so it HAS to be right.

George
Back to the top
 
Posted
Rating:
#70392
Avatar

Tell me an exact RSS URL and what exact timezone you have set in your member profile and what you expected to see please.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70393
Avatar

Fan in action

 Chris.

This is the feed URL

http://pipes.yahoo.com/pipes/pipe.run?_id=4153ffbd2d7289be4243c9a9166c788a&_render=rss 

It shows for me the following

HS1283 - House for Sale
13 June 2011 16:02


ocPortal is showing

My PC is set to (UTC+07:00) Bangkok, Hanoi, Jakarta and ocPortal is set to the same.

I've registered FTP access to the account for support if you wish to test, but as it's now 23:33 here and it's been a long day, I'm not likelty to be around to answer for much longer.


George

Back to the top
 
Posted
Rating:
#70398
Avatar

Seems to be working for me with this same RSS URL and your timezone set. Perhaps we just have a case where the block cache needs emptying?



(You've just passed midnight so 'Yesterday' is correct, although for me it would still be today).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70448
Avatar

Fan in action

Chris,

I agree.

It seems to be related to the cache. I was in a position that IE9 was displaying different data to Firefox

I'm guessing that I've now passed the expiration of the cache and both browsers are now showing the correct date.

(I thought I'd turned off all the caching for both ocPortal and for my browsers, but maybe I missed something somewhere - It was disturbing to see IE9 and Firefox having different datestamps for the same server-side data)

Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: