<?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: Bug of the Day: nil.include error with create_time_zone_conversion_attribute</title>
	<atom:link href="http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/</link>
	<description>Watching Open Source unfold across Ireland</description>
	<lastBuildDate>Tue, 29 Nov 2011 14:11:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Brad Langhrost</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-33906</link>
		<dc:creator>Brad Langhrost</dc:creator>
		<pubDate>Sat, 23 Jul 2011 21:21:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-33906</guid>
		<description>I fixed it like this
if [&#039;2.3.5&#039;,&#039;2.3.6&#039;,&#039;2.3.7&#039;,&#039;2.3.8&#039;,&#039;2.3.9&#039;,&#039;2.3.11&#039;, &#039;2.3.12&#039;].include?(Rails.version.to_s)
  require &#039;active_record&#039;

  module ActiveRecord
    module AttributeMethods
      module ClassMethods
        def create_time_zone_conversion_attribute?(name, column)
          time_zone_aware_attributes &amp;&amp; !((skip_time_zone_conversion_for_attributes &#124;&#124; []).include?(name.to_sym)) &amp;&amp; [:datetime, :timestamp].include?(column.type)
        end
      end
    end
  end
end</description>
		<content:encoded><![CDATA[<p>I fixed it like this<br />
if ['2.3.5','2.3.6','2.3.7','2.3.8','2.3.9','2.3.11', '2.3.12'].include?(Rails.version.to_s)<br />
  require &#8216;active_record&#8217;</p>
<p>  module ActiveRecord<br />
    module AttributeMethods<br />
      module ClassMethods<br />
        def create_time_zone_conversion_attribute?(name, column)<br />
          time_zone_aware_attributes &amp;&amp; !((skip_time_zone_conversion_for_attributes || []).include?(name.to_sym)) &amp;&amp; [:datetime, :timestamp].include?(column.type)<br />
        end<br />
      end<br />
    end<br />
  end<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Qorashi</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-14012</link>
		<dc:creator>Dave Qorashi</dc:creator>
		<pubDate>Thu, 07 Oct 2010 06:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-14012</guid>
		<description>Thanks, you save my day, dude.</description>
		<content:encoded><![CDATA[<p>Thanks, you save my day, dude.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Cox</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-11004</link>
		<dc:creator>Julian Cox</dc:creator>
		<pubDate>Tue, 03 Aug 2010 23:57:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-11004</guid>
		<description>Thanks for the blog post saved me some headbanging too. I&#039;ve upgraded from rails 2.1 and had:
config.time_zone = ‘Wellington’
(I&#039;m in NZ)
Removing that line makes Time.zone.now fail so the following two lines seems to work for and keeps it consistent with the old behaviour

config.time_zone = ‘Wellington’
config.active_record.default_timezone = :utc</description>
		<content:encoded><![CDATA[<p>Thanks for the blog post saved me some headbanging too. I&#8217;ve upgraded from rails 2.1 and had:<br />
config.time_zone = ‘Wellington’<br />
(I&#8217;m in NZ)<br />
Removing that line makes Time.zone.now fail so the following two lines seems to work for and keeps it consistent with the old behaviour</p>
<p>config.time_zone = ‘Wellington’<br />
config.active_record.default_timezone = :utc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete C</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-8272</link>
		<dc:creator>Pete C</dc:creator>
		<pubDate>Tue, 06 Apr 2010 20:02:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-8272</guid>
		<description>Argh, what a PIA!  Thanks, this saved my A....</description>
		<content:encoded><![CDATA[<p>Argh, what a PIA!  Thanks, this saved my A&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-7232</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 17 Feb 2010 19:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-7232</guid>
		<description>Thanks Stef!  Your solution fixed it for me.</description>
		<content:encoded><![CDATA[<p>Thanks Stef!  Your solution fixed it for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-6669</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Tue, 19 Jan 2010 15:03:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-6669</guid>
		<description>oh man, I had no idea why my tests were all of a sudden failing.  I was using the console in test mode and didn&#039;t want to have to restart every time i made a change.  Thanks SOO much!  I spent 2 hours of messing around before i decided to google this</description>
		<content:encoded><![CDATA[<p>oh man, I had no idea why my tests were all of a sudden failing.  I was using the console in test mode and didn&#8217;t want to have to restart every time i made a change.  Thanks SOO much!  I spent 2 hours of messing around before i decided to google this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcello Barnaba</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-6058</link>
		<dc:creator>Marcello Barnaba</dc:creator>
		<pubDate>Sun, 22 Nov 2009 18:02:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-6058</guid>
		<description>Thanks both (the original poster and Stef) for the solution.

I was headbanging since two hours ago! :-)</description>
		<content:encoded><![CDATA[<p>Thanks both (the original poster and Stef) for the solution.</p>
<p>I was headbanging since two hours ago! <img src='http://www.theirishpenguin.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-5846</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Tue, 10 Nov 2009 18:27:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-5846</guid>
		<description>Thank you so much!</description>
		<content:encoded><![CDATA[<p>Thank you so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivek Rajagopalan</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-5698</link>
		<dc:creator>Vivek Rajagopalan</dc:creator>
		<pubDate>Sat, 31 Oct 2009 04:32:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-5698</guid>
		<description>I cant thank you enough for this. This was a really nasty one.

Like KendallB - I too was on the verge of downgrading from 2.3.3.</description>
		<content:encoded><![CDATA[<p>I cant thank you enough for this. This was a really nasty one.</p>
<p>Like KendallB &#8211; I too was on the verge of downgrading from 2.3.3.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: th3james</title>
		<link>http://www.theirishpenguin.com/2009/01/22/bug-of-the-day-nilinclude-error-with-create_time_zone_conversion_attribute/comment-page-1/#comment-5555</link>
		<dc:creator>th3james</dc:creator>
		<pubDate>Fri, 16 Oct 2009 09:12:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.theirishpenguin.com/?p=196#comment-5555</guid>
		<description>Thanks for blogging this, thanks to your post I fixed this quickly, I&#039;m sure this coulda cost me hours!</description>
		<content:encoded><![CDATA[<p>Thanks for blogging this, thanks to your post I fixed this quickly, I&#8217;m sure this coulda cost me hours!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

