<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Interesting things about TIMESTAMP data type in MySQL</title>
	<atom:link href="http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/</link>
	<description>季庄新闻--Haidong Ji's Blog</description>
	<lastBuildDate>Thu, 11 Mar 2010 03:19:24 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jkj</title>
		<link>http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/comment-page-1/#comment-17719</link>
		<dc:creator>jkj</dc:creator>
		<pubDate>Thu, 23 Apr 2009 14:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.haidongji.com/?p=504#comment-17719</guid>
		<description>**By default, TIMESTAMP is NOT NULL**

When you do CREATE TABLE you are not specifying the possibility of NULL values. So of course you won&#039;t be able to save a NULL time stamp.</description>
		<content:encoded><![CDATA[<p>**By default, TIMESTAMP is NOT NULL**</p>
<p>When you do CREATE TABLE you are not specifying the possibility of NULL values. So of course you won&#8217;t be able to save a NULL time stamp.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haidong Ji</title>
		<link>http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/comment-page-1/#comment-17655</link>
		<dc:creator>Haidong Ji</dc:creator>
		<pubDate>Tue, 27 Jan 2009 22:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.haidongji.com/?p=504#comment-17655</guid>
		<description>Cheer James.

Long time no see my friend. Oh yeah, the lazy boy style defaults suit me just fine...</description>
		<content:encoded><![CDATA[<p>Cheer James.</p>
<p>Long time no see my friend. Oh yeah, the lazy boy style defaults suit me just fine&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Luetkehoelter</title>
		<link>http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/comment-page-1/#comment-17654</link>
		<dc:creator>James Luetkehoelter</dc:creator>
		<pubDate>Tue, 27 Jan 2009 18:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.haidongji.com/?p=504#comment-17654</guid>
		<description>Nice post - don&#039;t you love default behaviours? :)</description>
		<content:encoded><![CDATA[<p>Nice post &#8211; don&#8217;t you love default behaviours? <img src='http://www.haidongji.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haidong Ji</title>
		<link>http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/comment-page-1/#comment-17636</link>
		<dc:creator>Haidong Ji</dc:creator>
		<pubDate>Mon, 05 Jan 2009 20:21:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.haidongji.com/?p=504#comment-17636</guid>
		<description>You are exactly right kimseong. Thanks a lot!

Here is some further testing I did. I live in Chicago area, so it is 6 hours behind the UTC. I adjusted the limit to be 6 hours behind and got the expected results.

&lt;pre&gt;
mysql&gt; create table t1 (c1 timestamp);
Query OK, 0 rows affected (0.09 sec)

mysql&gt; insert into t1 values (&#039;1969-12-31 18:00:01&#039;);
Query OK, 1 row affected (0.03 sec)

mysql&gt; select * from t1;
+---------------------+
&#124; c1                  &#124;
+---------------------+
&#124; 1969-12-31 18:00:01 &#124;
+---------------------+
1 row in set (0.00 sec)

mysql&gt; insert into t1 values (&#039;1969-12-31 17:59:59&#039;);
ERROR 1292 (22007): Incorrect datetime value: &#039;1969-12-31 17:59:59&#039; for column &#039;c1&#039; at row 1
mysql&gt; insert into t1 values (&#039;2038-01-18 21:14:07&#039;);
Query OK, 1 row affected (0.02 sec)

mysql&gt; select * from t1;
+---------------------+
&#124; c1                  &#124;
+---------------------+
&#124; 1969-12-31 18:00:01 &#124;
&#124; 2038-01-18 21:14:07 &#124;
+---------------------+
2 rows in set (0.00 sec)

mysql&gt; insert into t1 values (&#039;2038-01-18 21:14:08&#039;);
ERROR 1292 (22007): Incorrect datetime value: &#039;2038-01-18 21:14:08&#039; for column &#039;c1&#039; at row 1
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You are exactly right kimseong. Thanks a lot!</p>
<p>Here is some further testing I did. I live in Chicago area, so it is 6 hours behind the UTC. I adjusted the limit to be 6 hours behind and got the expected results.</p>
<pre>
mysql> create table t1 (c1 timestamp);
Query OK, 0 rows affected (0.09 sec)

mysql> insert into t1 values ('1969-12-31 18:00:01');
Query OK, 1 row affected (0.03 sec)

mysql> select * from t1;
+---------------------+
| c1                  |
+---------------------+
| 1969-12-31 18:00:01 |
+---------------------+
1 row in set (0.00 sec)

mysql> insert into t1 values ('1969-12-31 17:59:59');
ERROR 1292 (22007): Incorrect datetime value: '1969-12-31 17:59:59' for column 'c1' at row 1
mysql> insert into t1 values ('2038-01-18 21:14:07');
Query OK, 1 row affected (0.02 sec)

mysql> select * from t1;
+---------------------+
| c1                  |
+---------------------+
| 1969-12-31 18:00:01 |
| 2038-01-18 21:14:07 |
+---------------------+
2 rows in set (0.00 sec)

mysql> insert into t1 values ('2038-01-18 21:14:08');
ERROR 1292 (22007): Incorrect datetime value: '2038-01-18 21:14:08' for column 'c1' at row 1
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2009-01-05 &#124; Yostivanich.com</title>
		<link>http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/comment-page-1/#comment-17635</link>
		<dc:creator>links for 2009-01-05 &#124; Yostivanich.com</dc:creator>
		<pubDate>Mon, 05 Jan 2009 15:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.haidongji.com/?p=504#comment-17635</guid>
		<description>[...] The Ji Village News » Interesting things about TIMESTAMP data type in MySQL How does TIMESTAMP work in MySQL. (tags: mysql database timestamp programming webdevelopment) [...]</description>
		<content:encoded><![CDATA[<p>[...] The Ji Village News » Interesting things about TIMESTAMP data type in MySQL How does TIMESTAMP work in MySQL. (tags: mysql database timestamp programming webdevelopment) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haidong Ji</title>
		<link>http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/comment-page-1/#comment-17634</link>
		<dc:creator>Haidong Ji</dc:creator>
		<pubDate>Mon, 05 Jan 2009 02:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.haidongji.com/?p=504#comment-17634</guid>
		<description>Thanks for that. I will test it out tomorrow.</description>
		<content:encoded><![CDATA[<p>Thanks for that. I will test it out tomorrow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kimseong</title>
		<link>http://www.haidongji.com/2009/01/04/interesting-things-about-timestamp-data-type-in-mysql/comment-page-1/#comment-17633</link>
		<dc:creator>kimseong</dc:creator>
		<pubDate>Mon, 05 Jan 2009 00:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.haidongji.com/?p=504#comment-17633</guid>
		<description>TIMESTAMP falls between ‘1970-01-01 00:00:01′ and ‘2038-01-19 03:14:07′

This is probably due to the timezone, since timestamp is timezone aware and is stored in the UTC timezone value. So, your testing of the limit might not be accurate due to your timezone settings.</description>
		<content:encoded><![CDATA[<p>TIMESTAMP falls between ‘1970-01-01 00:00:01′ and ‘2038-01-19 03:14:07′</p>
<p>This is probably due to the timezone, since timestamp is timezone aware and is stored in the UTC timezone value. So, your testing of the limit might not be accurate due to your timezone settings.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
