title: Problems with infinite time range in Rails
body: <p>On a table with both time range (Postgres type <code>tsrange</code>) and date range (Postgres type <code>daterange</code>) fields...</p>
  
  <p>Saving and then retrieving an unbound/infinite time range from DB causes an error:</p>
  
  <pre><code>object.a_time_range = Time.now.utc..DateTime::Infinity.new
  object.save!
  object.reload
  </code></pre>
  
  <blockquote>
    <p>=> ArgumentError: bad value for range</p>
  </blockquote>
  
  <p>However, doing the same with date range works fine:</p>
  
  <pre><code>object.a_date_range = Date.today..Date::Infinity.new
  object.save!
  object.reload
  </code></pre>
  
  <p>Is there a way to use infinite time ranges in Rails?</p>
  
  <p>ruby: 2.3.0,
  rails: 4.2.6</p>
  
  <p>(See also <a href="https://stackoverflow.com/questions/12567639/is-there-a-way-to-express-infinite-time">ruby - Is there a way to express 'infinite time' - Stack Overflow</a>)</p>