<?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: Making Rails time zone aware attributes and Chronic play well together</title>
	<atom:link href="http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/feed/" rel="self" type="application/rss+xml" />
	<link>http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/</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: Geoff Buesing</title>
		<link>http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/comment-page-1/#comment-3928</link>
		<dc:creator>Geoff Buesing</dc:creator>
		<pubDate>Sat, 08 Nov 2008 17:57:35 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/?p=36#comment-3928</guid>
		<description>@Jeff --

1. Time.parse treating unknown strings as Time.now is annoying and, imo, useless behavior -- which is why I made Rails&#039; Time.zone.parse just return nil when it doesn&#039;t understand input.

2. looks like Chronic fails to recognize &quot;11/02/2008 01:20 PM&quot; because of the leading zero on the hour -- the existence of such cases is probably a good argument for layering Chronic parsing on top of TimeZone#parse via alias_method_chain, versus re-implementing it.</description>
		<content:encoded><![CDATA[<p>@Jeff &#8211;</p>
<p>1. Time.parse treating unknown strings as Time.now is annoying and, imo, useless behavior &#8212; which is why I made Rails&#8217; Time.zone.parse just return nil when it doesn&#8217;t understand input.</p>
<p>2. looks like Chronic fails to recognize &#8220;11/02/2008 01:20 PM&#8221; because of the leading zero on the hour &#8212; the existence of such cases is probably a good argument for layering Chronic parsing on top of TimeZone#parse via alias_method_chain, versus re-implementing it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: samuells</title>
		<link>http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/comment-page-1/#comment-3926</link>
		<dc:creator>samuells</dc:creator>
		<pubDate>Wed, 05 Nov 2008 16:46:27 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/?p=36#comment-3926</guid>
		<description>Thanks for the post, I have been having the same problems.</description>
		<content:encoded><![CDATA[<p>Thanks for the post, I have been having the same problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Judge</title>
		<link>http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/comment-page-1/#comment-3922</link>
		<dc:creator>Jeff Judge</dc:creator>
		<pubDate>Sun, 02 Nov 2008 20:15:09 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/?p=36#comment-3922</guid>
		<description>Geof, 

I just found your blog. Thanks for all the helpful timezone info.

Related to this post, I&#039;m curious how you do you handle certain parsing issues with Chhronic. In an application that I work on, I added some logic similar to this:

t = Chronic.parse(str)
if t.nil?
 t = Time.parse(str)
end

That logic isn&#039;t great because Chronic doesn&#039;t know how to parse strings like &quot;11/02/2008 01:20 PM&quot; (it returns nil), yet Time.parse defaults to Time.now when parsing strings like &quot;asdf&quot; (which the ruby core team says is on purpose: http://redmine.ruby-lang.org/issues/show/281). It seems like Chronic.parse should be able to handle it all. I thought you might have run into some of this before.</description>
		<content:encoded><![CDATA[<p>Geof, </p>
<p>I just found your blog. Thanks for all the helpful timezone info.</p>
<p>Related to this post, I&#8217;m curious how you do you handle certain parsing issues with Chhronic. In an application that I work on, I added some logic similar to this:</p>
<p>t = Chronic.parse(str)<br />
if t.nil?<br />
 t = Time.parse(str)<br />
end</p>
<p>That logic isn&#8217;t great because Chronic doesn&#8217;t know how to parse strings like &#8220;11/02/2008 01:20 PM&#8221; (it returns nil), yet Time.parse defaults to Time.now when parsing strings like &#8220;asdf&#8221; (which the ruby core team says is on purpose: <a href="http://redmine.ruby-lang.org/issues/show/281)" rel="nofollow">http://redmine.ruby-lang.org/issues/show/281)</a>. It seems like Chronic.parse should be able to handle it all. I thought you might have run into some of this before.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohegan111</title>
		<link>http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/comment-page-1/#comment-3921</link>
		<dc:creator>Mohegan111</dc:creator>
		<pubDate>Sat, 01 Nov 2008 10:46:09 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/?p=36#comment-3921</guid>
		<description>Hmm. Good post.</description>
		<content:encoded><![CDATA[<p>Hmm. Good post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Milton Macedo</title>
		<link>http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/comment-page-1/#comment-3920</link>
		<dc:creator>Milton Macedo</dc:creator>
		<pubDate>Sat, 01 Nov 2008 07:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/?p=36#comment-3920</guid>
		<description>Keep up the good work! :)</description>
		<content:encoded><![CDATA[<p>Keep up the good work! <img src='http://mad.ly/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Buesing</title>
		<link>http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/comment-page-1/#comment-3919</link>
		<dc:creator>Geoff Buesing</dc:creator>
		<pubDate>Mon, 27 Oct 2008 13:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/?p=36#comment-3919</guid>
		<description>@Ed, the easiest thing to do is to put this code into a file (named time_zone_parse_with_chronic.rb, or whatever you like) in the config/initializers directory.</description>
		<content:encoded><![CDATA[<p>@Ed, the easiest thing to do is to put this code into a file (named time_zone_parse_with_chronic.rb, or whatever you like) in the config/initializers directory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://mad.ly/2008/09/25/making-rails-time-zone-aware-attributes-and-chronic-play-well-together/comment-page-1/#comment-3918</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Sat, 25 Oct 2008 23:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://mad.ly/?p=36#comment-3918</guid>
		<description>I&#039;m confused ... where does this patch go?
Thanks.</description>
		<content:encoded><![CDATA[<p>I&#8217;m confused &#8230; where does this patch go?<br />
Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
