<?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: Rails 2.1 Time Zone Support: An Overview</title>
	<atom:link href="http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/feed/" rel="self" type="application/rss+xml" />
	<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/</link>
	<description>rails, jquery, flash, etc</description>
	<lastBuildDate>Sun, 20 Dec 2009 21:02:36 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: David Baldwin</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3555</link>
		<dc:creator>David Baldwin</dc:creator>
		<pubDate>Wed, 20 Aug 2008 22:17:25 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3555</guid>
		<description>I wrote a blog post about a plugin called &quot;models_to_utc&quot; that provides a migration method to easily convert legacy timestamps to UTC.  This method is not dependent on any code within your application so is perfectly suited for ports from PHP or others...

http://bilsonrails.wordpress.com/2008/08/17/models_to_utc-rails-plugin/</description>
		<content:encoded><![CDATA[<p>I wrote a blog post about a plugin called &#8220;models_to_utc&#8221; that provides a migration method to easily convert legacy timestamps to UTC.  This method is not dependent on any code within your application so is perfectly suited for ports from PHP or others&#8230;</p>
<p><a href="http://bilsonrails.wordpress.com/2008/08/17/models_to_utc-rails-plugin/" rel="nofollow">http://bilsonrails.wordpress.com/2008/08/17/models_to_utc-rails-plugin/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Vogel</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3357</link>
		<dc:creator>Robert Vogel</dc:creator>
		<pubDate>Mon, 21 Jul 2008 15:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3357</guid>
		<description>Great article &amp; Thanks!

I&#039;m implementing Time Zones, and so far it is going pretty smoothly.  I write about one Gotcha.

My code is peppered with calls to Time.now - and I was worried about how Rails would interprete that object.  Time.now.class = Time whereas Time.zone.now.class = ActiveSupport::TimeWithZone. 

SO, I&#039;ve been concerned that I would need to replace my Time.now&#039;s with Time.zone.now&#039;s.  

So far Rails knows what do to with Time.now - it compares it against TimeWithZone fine, and handles assignments fine:  E.g., Model.updated_at = Time.now converts the Time to TimeWithZone fine.  

However, there is one place where I do need to change my code: in placeholders.  For example, I need to change:

Invite.count(:conditions =&gt; [&#039;created_at &gt; ?&#039;, Time.now.yesterday])

to

Invite.count(:conditions =&gt; [&#039;created_at &gt; ?&#039;, Time.zone.now.yesterday])

It appears that the code to interpolate the placeholders does not know about Time.zone.</description>
		<content:encoded><![CDATA[<p>Great article &amp; Thanks!</p>
<p>I&#8217;m implementing Time Zones, and so far it is going pretty smoothly.  I write about one Gotcha.</p>
<p>My code is peppered with calls to Time.now &#8211; and I was worried about how Rails would interprete that object.  Time.now.class = Time whereas Time.zone.now.class = ActiveSupport::TimeWithZone. </p>
<p>SO, I&#8217;ve been concerned that I would need to replace my Time.now&#8217;s with Time.zone.now&#8217;s.  </p>
<p>So far Rails knows what do to with Time.now &#8211; it compares it against TimeWithZone fine, and handles assignments fine:  E.g., Model.updated_at = Time.now converts the Time to TimeWithZone fine.  </p>
<p>However, there is one place where I do need to change my code: in placeholders.  For example, I need to change:</p>
<p>Invite.count(:conditions =&gt; ['created_at &gt; ?', Time.now.yesterday])</p>
<p>to</p>
<p>Invite.count(:conditions =&gt; ['created_at &gt; ?', Time.zone.now.yesterday])</p>
<p>It appears that the code to interpolate the placeholders does not know about Time.zone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fran</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3297</link>
		<dc:creator>Fran</dc:creator>
		<pubDate>Mon, 14 Jul 2008 15:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3297</guid>
		<description>Hello and thanks for this!
Problem: a year ago Venezuela (Caracas) changed its timezone from -4:00 to -4:30. How can this be corrected on the timezones database in Ruby?</description>
		<content:encoded><![CDATA[<p>Hello and thanks for this!<br />
Problem: a year ago Venezuela (Caracas) changed its timezone from -4:00 to -4:30. How can this be corrected on the timezones database in Ruby?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kent katayama</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3198</link>
		<dc:creator>kent katayama</dc:creator>
		<pubDate>Tue, 01 Jul 2008 11:10:30 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3198</guid>
		<description>Thank you very much! This was very helpful to start off. I will be back to look at this and more to understand Ruby on Rails. I am just a beginner, but given some time to absorb this ... I hope to become very efficient ...

Mahalo and Aloha,

Kent</description>
		<content:encoded><![CDATA[<p>Thank you very much! This was very helpful to start off. I will be back to look at this and more to understand Ruby on Rails. I am just a beginner, but given some time to absorb this &#8230; I hope to become very efficient &#8230;</p>
<p>Mahalo and Aloha,</p>
<p>Kent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor Turk</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3114</link>
		<dc:creator>Trevor Turk</dc:creator>
		<pubDate>Mon, 09 Jun 2008 16:09:42 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3114</guid>
		<description>Here&#039;s a quick migration for people moving from time zone support in Rails &lt; 2.1:

http://almosteffortless.com/2008/06/03/migrate-to-the-rails-default-time-zones/</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a quick migration for people moving from time zone support in Rails &lt; 2.1:</p>
<p><a href="http://almosteffortless.com/2008/06/03/migrate-to-the-rails-default-time-zones/" rel="nofollow">http://almosteffortless.com/2008/06/03/migrate-to-the-rails-default-time-zones/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pankaj</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3081</link>
		<dc:creator>Pankaj</dc:creator>
		<pubDate>Wed, 04 Jun 2008 14:19:25 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3081</guid>
		<description>Hi Geoff,

Very nice feature...and helfull article.

Is it mandatory that mysql timezone should be &#039;UTC&#039;?
In one of my application I want to show data to user based on his local timezone.And our server timezone is PDT.

Can you give any tactics?...

Thanks..</description>
		<content:encoded><![CDATA[<p>Hi Geoff,</p>
<p>Very nice feature&#8230;and helfull article.</p>
<p>Is it mandatory that mysql timezone should be &#8216;UTC&#8217;?<br />
In one of my application I want to show data to user based on his local timezone.And our server timezone is PDT.</p>
<p>Can you give any tactics?&#8230;</p>
<p>Thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ernie</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3068</link>
		<dc:creator>Ernie</dc:creator>
		<pubDate>Tue, 03 Jun 2008 12:59:11 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3068</guid>
		<description>Geoff, thanks for this! I played around with the new 2.1 time zone support and it works very cleanly. I tossed together a quick blog post discussing one of the gotchas you listed, migrating existing non-UTC data to UTC, specifically discussing MySQL.

I figure it may be of some help to newer Rails developers upgrading an app to 2.1, and MySQL&#039;s convert_tz is a simple way to get even large databases updated very quickly. The post is at http://thebalance.metautonomo.us/2008/06/02/updating-mysql-datetimes-for-rails-21-time-zones/ ... hope it helps someone.</description>
		<content:encoded><![CDATA[<p>Geoff, thanks for this! I played around with the new 2.1 time zone support and it works very cleanly. I tossed together a quick blog post discussing one of the gotchas you listed, migrating existing non-UTC data to UTC, specifically discussing MySQL.</p>
<p>I figure it may be of some help to newer Rails developers upgrading an app to 2.1, and MySQL&#8217;s convert_tz is a simple way to get even large databases updated very quickly. The post is at <a href="http://thebalance.metautonomo.us/2008/06/02/updating-mysql-datetimes-for-rails-21-time-zones/" rel="nofollow">http://thebalance.metautonomo.us/2008/06/02/updating-mysql-datetimes-for-rails-21-time-zones/</a> &#8230; hope it helps someone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danimal</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3010</link>
		<dc:creator>Danimal</dc:creator>
		<pubDate>Sun, 18 May 2008 19:51:34 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3010</guid>
		<description>Geoff,

Thanks for putting this together! Quick question: for those of us who aren&#039;t able to use Edge Rails (yet), can I get all this goodness in a plugin (or two?) Is it just the TZInfo gem? or is there more?

Also, with Binh&#039;s question: isn&#039;t the whole thing moot if you are using UTC for everything? I.e. you do your hourly run, and find any alerts that match... in UTC... the current server time... in UTC. Then you are comparing apples-to-apples. The whole point being: timezones are for end-user simplicity. &quot;flatten&quot; everything to UTC internally for technical simplicity.

Woo!

-Danimal</description>
		<content:encoded><![CDATA[<p>Geoff,</p>
<p>Thanks for putting this together! Quick question: for those of us who aren&#8217;t able to use Edge Rails (yet), can I get all this goodness in a plugin (or two?) Is it just the TZInfo gem? or is there more?</p>
<p>Also, with Binh&#8217;s question: isn&#8217;t the whole thing moot if you are using UTC for everything? I.e. you do your hourly run, and find any alerts that match&#8230; in UTC&#8230; the current server time&#8230; in UTC. Then you are comparing apples-to-apples. The whole point being: timezones are for end-user simplicity. &#8220;flatten&#8221; everything to UTC internally for technical simplicity.</p>
<p>Woo!</p>
<p>-Danimal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mima</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3009</link>
		<dc:creator>mima</dc:creator>
		<pubDate>Sat, 17 May 2008 23:09:56 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3009</guid>
		<description>Time zones in Rails! Unicode in Rails! After all these years, they&#039;ve come to realize that there&#039;s a world out there. Now I hope for a strftime with locales.</description>
		<content:encoded><![CDATA[<p>Time zones in Rails! Unicode in Rails! After all these years, they&#8217;ve come to realize that there&#8217;s a world out there. Now I hope for a strftime with locales.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/comment-page-1/#comment-3008</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sat, 17 May 2008 13:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/#comment-3008</guid>
		<description>Thank you for posting this guide.  It has helped a lot.  I&#039;m kind of in the same situation as Binh in that I am trying to identify the best way to iterate through each user&#039;s time zone as a cron job that way the app can take action based on the time users entered to get reminders etc.  

Looking forward to future posts!  Thanks for your help and contributions to Rails!</description>
		<content:encoded><![CDATA[<p>Thank you for posting this guide.  It has helped a lot.  I&#8217;m kind of in the same situation as Binh in that I am trying to identify the best way to iterate through each user&#8217;s time zone as a cron job that way the app can take action based on the time users entered to get reminders etc.  </p>
<p>Looking forward to future posts!  Thanks for your help and contributions to Rails!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
