<?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"
	>
<channel>
	<title>Comments on: Rails, PostgreSQL and Time</title>
	<atom:link href="http://marcus.ahnve.net/2007/05/09/rails-postgresql-and-time/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcus.ahnve.net/2007/05/09/rails-postgresql-and-time/</link>
	<description>A northern, icebears-on-the-streets, view on programming, music etc. from Marcus Ahnve</description>
	<pubDate>Thu, 20 Nov 2008 21:39:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Marcus</title>
		<link>http://marcus.ahnve.net/2007/05/09/rails-postgresql-and-time/#comment-20057</link>
		<dc:creator>Marcus</dc:creator>
		<pubDate>Mon, 11 Jun 2007 06:18:38 +0000</pubDate>
		<guid isPermaLink="false">http://marcus.ahnve.net/2007/05/09/rails-postgresql-and-time/#comment-20057</guid>
		<description>&lt;p&gt;Interesting bug, I hadn't thought of that.&lt;/p&gt;

&lt;p&gt;I try to stay clear of MySQL, there are too many stories of data corruptiion around.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Interesting bug, I hadn&#8217;t thought of that.</p>

<p>I try to stay clear of MySQL, there are too many stories of data corruptiion around.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Fotos Georgiadis</title>
		<link>http://marcus.ahnve.net/2007/05/09/rails-postgresql-and-time/#comment-19958</link>
		<dc:creator>Fotos Georgiadis</dc:creator>
		<pubDate>Sat, 09 Jun 2007 00:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://marcus.ahnve.net/2007/05/09/rails-postgresql-and-time/#comment-19958</guid>
		<description>&lt;p&gt;No you are not...&lt;/p&gt;

&lt;p&gt;Just got bitten by this. This is how:
I have a model with attributes time&lt;em&gt;start and time&lt;/em&gt;end of type :time (time without timezone in PostgreSQL) and one validation that (yes you guessed it) checks whether time&lt;em&gt;start &#62; h = WorkingHour.find(1)
=&#62; #"1", "id"=&#62;"1", "time&lt;/em&gt;end"=&#62;"15:00:00", "time&lt;em&gt;start"=&#62;"08:00:00", "photographer&lt;/em&gt;id"=&#62;"1"}&#62;
&#62;&#62; h.valid?
=&#62; true
&#62;&#62; h.time&lt;em&gt;end
=&#62; Sat Jan 01 15:00:00 +0200 2000
&#62;&#62; h.time&lt;/em&gt;start
=&#62; Sat Jan 01 08:00:00 +0200 2000
&#62;&#62; h.time&lt;em&gt;start = Time.now
=&#62; Sat Jun 09 03:17:50 +0300 2007
&#62;&#62; h.time&lt;/em&gt;end&lt;br /&gt;
=&#62; Sat Jan 01 15:00:00 +0200 2000
&#62;&#62; h.valid?
=&#62; false
&#62;&#62;  h.errors.full_messages
=&#62; ["Starting time must be before ending time"]&lt;/p&gt;

&lt;p&gt;This is a bug that needs fixing!
What's the behaviour in MySQL btw?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>No you are not&#8230;</p>

<p>Just got bitten by this. This is how:
I have a model with attributes time<em>start and time</em>end of type :time (time without timezone in PostgreSQL) and one validation that (yes you guessed it) checks whether time<em>start &gt; h = WorkingHour.find(1)
=&gt; #&#8221;1&#8243;, &#8220;id&#8221;=&gt;&#8221;1&#8243;, &#8220;time</em>end&#8221;=&gt;&#8221;15:00:00&#8243;, &#8220;time<em>start&#8221;=&gt;&#8221;08:00:00&#8243;, &#8220;photographer</em>id&#8221;=&gt;&#8221;1&#8243;}&gt;
&gt;&gt; h.valid?
=&gt; true
&gt;&gt; h.time<em>end
=&gt; Sat Jan 01 15:00:00 +0200 2000
&gt;&gt; h.time</em>start
=&gt; Sat Jan 01 08:00:00 +0200 2000
&gt;&gt; h.time<em>start = Time.now
=&gt; Sat Jun 09 03:17:50 +0300 2007
&gt;&gt; h.time</em>end<br />
=&gt; Sat Jan 01 15:00:00 +0200 2000
&gt;&gt; h.valid?
=&gt; false
&gt;&gt;  h.errors.full_messages
=&gt; ["Starting time must be before ending time"]</p>

<p>This is a bug that needs fixing!
What&#8217;s the behaviour in MySQL btw?</p>]]></content:encoded>
	</item>
</channel>
</rss>
