<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle">
<!--
p
        {margin-top:0px;
        margin-bottom:0px}
p
        {margin-top:0px;
        margin-bottom:0px}
-->
</style>
</head>
<body>
<div style="direction:ltr; font-family:Times New Roman; color:#000000; font-size:12pt">
<p>Hi John,</p>
<p> </p>
<p>Many thanks for this. I added the elsif loop as you suggested and it worked, except for the one where I had updated the database and added the time. I reversed this change and made the time fields null again and that worked too. I still would like to have
the book's published date, which at the moment is part of the eprint description, but I'm now not sure if that's possible.</p>
<p> </p>
<p>Regards,</p>
<p>Malcolm.</p>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF356324" style="direction:ltr"><font color="#000000" size="2" face="Tahoma"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk [eprints-tech-bounces@ecs.soton.ac.uk] on behalf of John Salter [J.Salter@leeds.ac.uk]<br>
<b>Sent:</b> 07 November 2012 16:45<br>
<b>To:</b> 'eprints-tech@ecs.soton.ac.uk'<br>
<b>Subject:</b> [EP-tech] Re: RSS2 confused published date<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial">From the RSS entries, those without a published date don't have a timestamp in the Deposited date e.g.</font></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial">Date Deposited: 22 Feb 2007 (<a href="http://isls-eprints-31.wmin.ac.uk/3482/" target="_blank">http://isls-eprints-31.wmin.ac.uk/3482/</a>)</font></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial">I suspect there's some flawed logic for calculating the timestamp for the RSS feed - not setting it if any part (Y/M/D/H/m/S) isn't set.</font></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial">From this:
</font></span><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial"><a href="http://perldoc.perl.org/Time/Local.html" target="_blank">http://perldoc.perl.org/Time/Local.html</a> is states:</font></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012">If you supply data which is not valid (month 27, second 1,000) the results will be unpredictable (so don't do that).</span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial">I'm guessing that line 142 of:
<a href="http://trac.eprints.org/eprints/browser/branches/3.3/system/perl_lib/EPrints/Plugin/Export/RSS2.pm" target="_blank">
http://trac.eprints.org/eprints/browser/branches/3.3/system/perl_lib/EPrints/Plugin/Export/RSS2.pm</a> will fail when there's no timestamp in the $datestamp - and therefore the pubDate element isn't added.</font></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial">Suggestions:</font></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial">1. Add an elsif loop to RSS2.pm (copying lines 142-150), but change the test to:
</font></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><span class="nv">$datestamp</span> <span class="o">=~</span><span class="sr"> /^(\d{4})-(\d{2})-(\d{2})$/</span></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><span class="sr"><font color="#0000ff" size="2" face="Arial"> - which will pick up dates without times, and then use:</font></span></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><span class="sr"> <span class="k">my</span> <span class="nv">$time</span> <span class="o">=</span> timelocal<span class="p">(</span> <span class="nv">0</span><span class="p">,</span> <span class="nv">0</span><span class="p">,</span> <span class="nv">0</span><span class="p">,</span> <span class="nv">$3</span><span class="p">,</span> <span class="nv">$2</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="nv">$1</span> <span class="p">);</span></span></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><span class="sr"><span class="p"></span></span></span> </div>
<div dir="ltr" align="left"><span class="639322416-07112012"><span class="sr"><span class="p"><font color="#0000ff" size="2" face="Arial">2. Add time data to the eprints that is missing it..?</font></span></span></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><span class="sr"><span class="p"><font color="#0000ff" size="2" face="Arial"></font></span></span></span> </div>
<div dir="ltr" align="left"><span class="639322416-07112012"><span class="sr"><span class="p"><font color="#0000ff" size="2" face="Arial">Cheers,<br>
John</font></span></span></span></div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="639322416-07112012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left">
<hr tabindex="-1">
</div>
<div dir="ltr" align="left"><font size="2" face="Tahoma"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Malcolm Bodger<br>
<b>Sent:</b> 07 November 2012 12:27<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] Re: RSS2 confused published date<br>
</font><br>
</div>
<div></div>
<div style="font-family:Times New Roman; direction:ltr; color:#000000; font-size:12pt">
<p>Hi John,</p>
<p> </p>
<p>Our web people want to use the RSS2 output from from the 'browse by author' output for the staff web CVs</p>
<p>Opening the RSS2 feed on the 'Browse by Author' output for 'Abbey, Robert M' gives me the date and the green arrows, which I also get on the 'latest_tool' link. The dates do appear to be the deposited dates.</p>
<p> </p>
<p>I'll take a look at the link you've provided.</p>
<p>Many thanks,</p>
<p>Malcolm.</p>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF499763" style="direction:ltr"><font color="#000000" size="2" face="Tahoma"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk [eprints-tech-bounces@ecs.soton.ac.uk] on behalf of John Salter [J.Salter@leeds.ac.uk]<br>
<b>Sent:</b> 07 November 2012 10:55<br>
<b>To:</b> 'eprints-tech@ecs.soton.ac.uk'<br>
<b>Subject:</b> [EP-tech] Re: RSS2 confused published date<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr" align="left"><span class="861523810-07112012"><font color="#0000ff" size="2" face="Arial">When I look at the RSS output (<a href="http://isls-eprints-31.wmin.ac.uk/cgi/latest_tool?output=RSS2" target="_blank">http://isls-eprints-31.wmin.ac.uk/cgi/latest_tool?output=RSS2</a>)
all items have published dates.</font></span></div>
<div dir="ltr" align="left"><span class="861523810-07112012"><font color="#0000ff" size="2" face="Arial">The 'little green arrow' sounds like you're putting the RSS through some form of renderer - which may be grouping same-RSS-published-dates together?</font></span></div>
<div dir="ltr" align="left"><span class="861523810-07112012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="861523810-07112012"></span><font face="Arial"><font color="#0000ff"><font size="2">Y<span class="861523810-07112012">ou may be able to add microformats to the <item> to help you with this (<a href="http://microformats.org/discuss/mail/microformats-discuss/2005-August/000670.html" target="_blank">http://microformats.org/discuss/mail/microformats-discuss/2005-August/000670.html</a>),
or change the rendered to extract the (date) from the citation.</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="861523810-07112012"></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="861523810-07112012">What renderer are you using (or is it a browser's rendering of the feed? Firefox looks OK - but no green arrows!)?</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="861523810-07112012"></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="861523810-07112012">Cheers,</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span class="861523810-07112012">John</span></font></font></font></div>
<div dir="ltr" align="left"><br>
</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"></font> </div>
<div dir="ltr" lang="en-us" class="OutlookMessageHeader" align="left">
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Malcolm Bodger<br>
<b>Sent:</b> 07 November 2012 10:29<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] Re: RSS2 confused published date<br>
</font><br>
</div>
<div></div>
<div style="font-family:Times New Roman; direction:ltr; color:#000000; font-size:12pt">
<p>John,</p>
<p> </p>
<p>Many thanks, that explains. </p>
<p>But, why do I not get the RSS published date on my second example?</p>
<p>Is it possible to replace the RSS published date with the item's published date?</p>
<p> </p>
<p>Thanks,</p>
<p>Malcolm. </p>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF80043" style="direction:ltr"><font color="#000000" size="2" face="Tahoma"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk [eprints-tech-bounces@ecs.soton.ac.uk] on behalf of John Salter [J.Salter@leeds.ac.uk]<br>
<b>Sent:</b> 07 November 2012 10:04<br>
<b>To:</b> 'eprints-tech@ecs.soton.ac.uk'<br>
<b>Subject:</b> [EP-tech] Re: RSS2 confused published date<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr" align="left"><span class="037450210-07112012"><font color="#0000ff" size="2" face="Arial">Malcolm,</font></span></div>
<div dir="ltr" align="left"><span class="037450210-07112012"><font color="#0000ff" size="2" face="Arial">I think you may be confusing the RSS published date (e.g. the date that the record appeared in the RSS feed - the deposit date - which is needed for RSS
to work out what's going on), and the item-published-date. I would not expect these to be the same...</font></span></div>
<div dir="ltr" align="left"><span class="037450210-07112012"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="037450210-07112012"><font color="#0000ff" size="2" face="Arial">Cheers,</font></span></div>
<div dir="ltr" align="left"><span class="037450210-07112012"><font color="#0000ff" size="2" face="Arial">John</font></span></div>
<br>
<div dir="ltr" lang="en-us" class="OutlookMessageHeader" align="left">
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Malcolm Bodger<br>
<b>Sent:</b> 07 November 2012 09:51<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] RSS2 confused published date<br>
</font><br>
</div>
<div></div>
<div style="font-family:Times New Roman; direction:ltr; color:#000000; font-size:12pt">
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt">Hi,</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt"> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt">I'm trying to get the published date to appear before that little green arrow on the RSS2 output, but what I get is the date of deposit. Here, looking at the page source, the document was published in (2007)
but the top line shows the date it was deposited - 17th June 2008. The second example shows no top line even though the deposit and published date are entered. Looking at the top line in the first example, it is flagged as being the 'pubDate' so I would expect
'2007' to appear and not 'Tue, 17 Jun 2008 15:19:13 +0100' Can someone give me a clue here? Why is the deposit date shown and not the published date? Why do some have no date at all? Is it something to do with null values for the published date?</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt"> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">Tue, 17 Jun 2008 15:19:13 +0100</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">A practical approach to conveyancing. 9th edition</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">http://isls-eprints-31.wmin.ac.uk/5176/</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">http://isls-eprints-31.wmin.ac.uk/5176/</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">Abbey, Robert M. and Richards, Mark B.<span>
</span>(2007) A practical approach to conveyancing. 9th edition.<span> </span>
Oxford University Press, Oxford, UK.<span> </span>ISBN 9780199212316</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt"> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt"> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">A practical approach to conveyancing. 8th edition</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">http://isls-eprints-31.wmin.ac.uk/2040/</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">http://isls-eprints-31.wmin.ac.uk/2040/</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 54pt">Abbey, Robert M. and Richards, Mark B.<span>
</span>(2006) A practical approach to conveyancing. 8th edition.<span> </span>
Oxford University Press, Oxford, UK.<span> </span>ISBN 019928945X</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt"> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt"> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt">Regards,</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt 36pt">Malcolm.</p>
</div>
<div align="center">
<p><font color="black" size="0" face="Arial, Helvetica, sans-serif">The University of Westminster is a charity and a company limited by guarantee. Registration number: 977818 England. Registered Office: 309 Regent Street, London W1B 2UW.</p>
</font></div>
</div>
</div>
</div>
<div align="center">
<p><font color="black" size="0" face="Arial, Helvetica, sans-serif">The University of Westminster is a charity and a company limited by guarantee. Registration number: 977818 England. Registered Office: 309 Regent Street, London W1B 2UW.</p>
</font></div>
</div>
</div>
</div>
<div align="center">
<p><font color="black" size="0" face="Arial, Helvetica, sans-serif">The University of Westminster is a charity and a company limited by guarantee. Registration number: 977818 England. Registered Office: 309 Regent Street, London W1B 2UW.</p>
</font></div>
</div>
</div>
</div>
<div align="center">
<p><font color="black" size="0.9em" face="Arial, Helvetica, sans-serif">The University of Westminster is a charity and a company limited by guarantee. Registration number: 977818 England. Registered Office: 309 Regent Street, London W1B 2UW.</p>
</font></div>
</body>
</html>