<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Relative Dates in WordPress Templates</title>
	<atom:link href="http://blog.ninedays.org/2008/06/23/relative-dates-in-wordpress-templates/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ninedays.org/2008/06/23/relative-dates-in-wordpress-templates/</link>
	<description>web development, photography, tutorials and adventure</description>
	<pubDate>Tue, 06 Jan 2009 07:06:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Josh</title>
		<link>http://blog.ninedays.org/2008/06/23/relative-dates-in-wordpress-templates/#comment-2095</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Sat, 20 Dec 2008 15:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/?p=290#comment-2095</guid>
		<description>&lt;p&gt;This function is great. Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This function is great. Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://blog.ninedays.org/2008/06/23/relative-dates-in-wordpress-templates/#comment-1304</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 03 Oct 2008 11:38:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/?p=290#comment-1304</guid>
		<description>&lt;p&gt;Nice coding - yes it's good to personalise the timestamps according to the visitor (i.e. when they are reading the comments).  I see digg.com does this now too.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice coding - yes it's good to personalise the timestamps according to the visitor (i.e. when they are reading the comments).  I see digg.com does this now too.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://blog.ninedays.org/2008/06/23/relative-dates-in-wordpress-templates/#comment-1302</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Thu, 02 Oct 2008 07:06:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/?p=290#comment-1302</guid>
		<description>&lt;p&gt;Forget my last comment, it wasn't that :)
Took me long enough to figure out but it was negative because in "&lt;code&gt;$difference = time() - $timestamp;&lt;/code&gt;" the &lt;code&gt;time()&lt;/code&gt; gets the server timestamp and the &lt;code&gt;$timestamp&lt;/code&gt; (which is &lt;code&gt;get_comment_time('U')&lt;/code&gt;), is the WordPress time which includes the offset set in the options page.
From what they say on &lt;a href="http://codex.wordpress.org/Function_Reference/current_time" rel="nofollow"&gt;http://codex.wordpress.org/Function_Reference/current_time&lt;/a&gt; , using &lt;code&gt;current_time('timestamp')&lt;/code&gt; instead of &lt;code&gt;time()&lt;/code&gt; should work but it didn't... I still had to add my time zone offset in the code.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Forget my last comment, it wasn't that :)
Took me long enough to figure out but it was negative because in "<code>$difference = time() - $timestamp;</code>" the <code>time()</code> gets the server timestamp and the <code>$timestamp</code> (which is <code>get_comment_time('U')</code>), is the WordPress time which includes the offset set in the options page.
From what they say on <a href="http://codex.wordpress.org/Function_Reference/current_time" rel="nofollow">http://codex.wordpress.org/Function_Reference/current_time</a> , using <code>current_time('timestamp')</code> instead of <code>time()</code> should work but it didn't... I still had to add my time zone offset in the code.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://blog.ninedays.org/2008/06/23/relative-dates-in-wordpress-templates/#comment-1301</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Thu, 02 Oct 2008 05:27:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/?p=290#comment-1301</guid>
		<description>&lt;p&gt;I was trying this on my redesign and for some reason all the $difference's ware negative until I changed them to:
$difference = $timestamp - time();
And now it's working correctly. Seems strange to me too, but it does...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I was trying this on my redesign and for some reason all the $difference's ware negative until I changed them to:
$difference = $timestamp - time();
And now it's working correctly. Seems strange to me too, but it does...</p>]]></content:encoded>
	</item>
</channel>
</rss>
