title: Timezone Issues with DateTime, DBIx::Class and SQLite (Time Off by 5 Hours)
body: <p>I'm using a DBIx::Class schema generated by <code>dbcidump</code> to make inserts and queries.</p>
  
  <p>Recently, I discovered that all of my times are stored +5 hours ahead of our local time (est).</p>
  
  <p>In my <code>Result</code> class, I have <code>__PACKAGE__-&gt;load_components("InflateColumn::DateTime")</code>, where the column is defined as <code>"action_time",  { data_type =&gt; "datetime", is_nullable =&gt; 0}</code>...</p>
  
  <p>Is there an easy way to make it so I can control the timezone <code>DateTime</code> objects are being inflated / deflated with so that my queries and inserts are consistent? </p>
  
  <p>I have tried adding <code>time_zone =&gt; 'local'</code> to the column definition, but that makes no difference.</p>
  
  <p>eg: </p>
  
  <ul>
  <li><strong>insert</strong> 2012-12-12 10:04:03</li>
  <li><strong>retrieve</strong> 2012-12-12 15:04:03</li>
  </ul>
  
  <p>sample data:</p>
  
  <pre><code>sqlite&gt; select datetime(action_time,'localtime'),action_time from actions order by id desc limit 3;
  2012-12-12 08:35:07|2012-12-12 13:35:07
  2012-12-12 08:34:45|2012-12-12 13:34:45
  2012-12-12 08:34:43|2012-12-12 13:34:43
  </code></pre>
  
  <p><strong>EDIT:</strong> I believe this has something to do with my use of:
  <a href="http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/ResultClass/HashRefInflator.pm" rel="nofollow">http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/ResultClass/HashRefInflator.pm</a> ; from the docs:</p>
  
  <blockquote>
    <p>Column value inflation, e.g., using modules like DBIx::Class::InflateColumn::DateTime, is not performed. The returned hash contains the raw database values.</p>
  </blockquote>
  
  <p>Therefore, I'm wondering how to get that class to do something special for datetime fields.</p>