<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gaunt Face &#124; Matthew Gaunt &#187; Facebook</title>
	<atom:link href="http://www.gauntface.co.uk/blog/tag/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gauntface.co.uk/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 31 Jan 2012 23:21:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Handling Facebook Date/Times</title>
		<link>http://www.gauntface.co.uk/blog/2009/12/28/handling-facebook-datetimes/</link>
		<comments>http://www.gauntface.co.uk/blog/2009/12/28/handling-facebook-datetimes/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 16:19:32 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Time]]></category>

		<guid isPermaLink="false">http://www.gauntface.co.uk/blog/?p=375</guid>
		<description><![CDATA[Today I was playing around with the facebook api and needed to extract the date and time for each event. When you look at the value from the api call, you get something along the lines of: 1262028000 For the date of the event from the facebook event page, is 28th Dec 09 11:20, so [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-medium wp-image-376  aligncenter" title="Facebook Logo" src="http://www.gauntface.co.uk/blog/wp-content/uploads/2009/12/logo_facebook-300x112.jpg" alt="Facebook Logo" width="300" height="112" /></p>
<p>Today I was playing around with the facebook api and needed to extract the date and time for each event. When you look at the value from the api call, you get something along the lines of:</p>
<p>1262028000</p>
<p>For the date of the event from the facebook event page, is 28th Dec 09 11:20, so what is the result above all about? Well it&#8217;s <a title="Wikipedia Unix Epoch Time" href="http://en.wikipedia.org/wiki/Unix_time#Definition">Unix Epoch Time</a> representation of the time, however the wonderful folks of facebook convert the time into pacific time, before then converting it to Unix Epoch time. So in php to extract the date/time in your local time zone do the following:</p>
<p>date_default_timezone_set(&#8216;America/Los_Angeles&#8217;);</p>
<p>$startDate = date(&#8216;d m Y H:i&#8217;, $eventInfo['start_time']);</p>
<p>and this will give you a time like this:</p>
<p>28 12 2009 11:20</p>
<p>I can&#8217;t take any of the credit for this, all of it has to go marc2003 over at <a title="Overclockers Forum Post" href="http://forums.overclockers.co.uk/showthread.php?t=18095238">forums.overclockers.co.uk</a>.</p>
<p>Anyone looking for more info on handling facebook events api I strongly recommend this site &#8211; <a href="http://www.phpeveryday.com/articles/Facebook-Programming-API-Events-P852.html">http://www.phpeveryday.com/articles/Facebook-Programming-API-Events-P852.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gauntface.co.uk/blog/2009/12/28/handling-facebook-datetimes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

