<?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>mamat &#187; Date</title>
	<atom:link href="http://www.gengjawa.com/mamat/tag/date/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gengjawa.com/mamat</link>
	<description>myBlog share information</description>
	<lastBuildDate>Sun, 09 Aug 2009 15:21:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP : Date &amp; Time</title>
		<link>http://www.gengjawa.com/mamat/php-date-time/</link>
		<comments>http://www.gengjawa.com/mamat/php-date-time/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 23:42:28 +0000</pubDate>
		<dc:creator>maMat</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[Time]]></category>

		<guid isPermaLink="false">http://www.gengjawa.com/mamat/?p=117</guid>
		<description><![CDATA[PHP coding for Date &#38; Time.. enjoy all! output: 2009-03-04 20:33:05]]></description>
			<content:encoded><![CDATA[<p>PHP coding for Date &amp; Time.. enjoy all!</p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax1"></a><a style="wp-synhighlighter-title" href="#codesyntax1"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><div class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">//created by mamat@gengjawa</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$date</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y-m-d'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$time_offset</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot; 240 &quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Change this to your time zone (240 for malaysia)</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$time_a</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$time_offset</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">120</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$time</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H:i:s&quot;</span><span style="color: #339933;">,</span><a href="http://www.php.net/time"><span style="color: #990000;">time</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$time_a</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$datetime</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$date</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&amp;nbsp;'</span> <span style="color: #000088;">$time</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// output like this : 2009-03-04 20:33:05</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">&lt;?</span> <a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #000088;">$datetime</span><span style="color: #339933;">;</span>?<span style="color: #339933;">&gt;</span></div></li>
<li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
</ol></div></div></div>
<p>output:</p>
<p><code>2009-03-04 20:33:05</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gengjawa.com/mamat/php-date-time/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
