GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   RSS question regarding <pubDate> (https://gfy.com/showthread.php?t=659419)

RedShoe 09-25-2006 11:39 PM

RSS question regarding <pubDate>
 
I'm not sure I'm understanding the <pubDate> tags in RSS. Is there an actual code that you insert between the tags to get the date? Do you just leave it blank and the date is inserted there when the document is published?

Is it like in javascript where you create a code like <? print date("F d, Y H:i:s", time())?> and then it posts the time when the doc is published?

Kinda confused. Does anyone know?

Thanks.

GrouchyAdmin 09-25-2006 11:40 PM

You could do that, almost just like that in PHP, yes.

Quote:

The <pubDate> element defines the last publication date for the content in the RSS feed.


<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">

<channel>
<title>W3Schools Home Page</title>
<link>http://www.w3schools.com</link>
<description>Free web building tutorials</description>
<pubDate>Thu, 27 Apr 2006</pubDate>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>New RSS tutorial on W3Schools</description>
</item>
</channel>

</rss>
Since I regen my shit on the fly, I always use the local time for a LastBuild.

Jace 09-25-2006 11:41 PM

not sure if this helps or not, but here ya go

Quote:

pubDate The publication date for the content in the channel. For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred).

smashface 09-25-2006 11:45 PM

Are you trying to create software that will write an RSS feed or just manually creating an RSS feed? You can manually edit this date or have your feed creation software add it.

I think that feed readers use it to download new content and or updated items.

RedShoe 09-25-2006 11:56 PM

What I'm looking for is the actual code that gets inserted between the pubdate tags that will generate an actual date upon publication.

What I have is an evem more powerful templating system (one that is far too complicated for to get into here) It's taken me years to master and I want to be able to use this system to build RSS feeds. Which it can do, but I don't think it can insert a date, so I'll need to actually build the a timestamp code to go on the template so that every time it runs, the new content will get added into it and a date will get stamped into the proper area.

Solid Bob 09-26-2006 12:00 AM

Quote:

Originally Posted by RedShoe
What I'm looking for is the actual code that gets inserted between the pubdate tags that will generate an actual date upon publication.

What I have is an evem more powerful templating system (one that is far too complicated for to get into here) It's taken me years to master and I want to be able to use this system to build RSS feeds. Which it can do, but I don't think it can insert a date, so I'll need to actually build the a timestamp code to go on the template so that every time it runs, the new content will get added into it and a date will get stamped into the proper area.

It's something simple, I'm sure someone will post it exactly in a few. I don't have it in front of me or I'd tell you.

Oh, and shhhhhhhhhhhhhhhhh.

RedShoe 09-26-2006 01:14 AM

Quote:

Originally Posted by Solid Bob
It's something simple, I'm sure someone will post it exactly in a few. I don't have it in front of me or I'd tell you.

Oh, and shhhhhhhhhhhhhhhhh.

It's been an hour and fifteen since you said someone would post it in a few. Either their post got deleted, or they never posted it.

RedShoe 09-26-2006 02:28 AM

let timestamp_regexp = '\v\C%(<Last %([cC]hanged?|[Mm]odified):\s+)@<=.*$'

<variable name="aVariable3" expr=":timestamp.hour"/>

xjvf timestamp.tbz2


Am I close?


All times are GMT -7. The time now is 12:47 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123