title: Propel timestampable behavior in UTC
body: <p>I am using Propel 1.6 with MySql. I set the timestampable behavior on all my tables as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;database name="default" &gt;
      &lt;behavior name="timestampable"&gt;
          &lt;parameter name="create_column" value="creation_date" /&gt;
          &lt;parameter name="update_column" value="last_modified" /&gt;
      &lt;/behavior&gt;
  
      &lt;table name="book" phpName="Book"&gt;
          &lt;!-- table colums omitted --&gt;
      &lt;/table&gt;
  &lt;/database&gt;
  </code></pre>
  
  <p>According to the <a href="http://propelorm.org/behaviors/timestampable" rel="nofollow">documentation</a> of the Propel timestampable behavior, there is no parameter to specify the timezone.</p>
  
  <p>I noticed that the timestampable behavior doesn't set the UTC time by default. For example, in my case, it sets UTC+1.</p>
  
  <p>Doing a bit of investigation, I've seen that if I use the <code>preInsert()</code> hook to set the time instead of a behavior and I pass the Unix timestamp:</p>
  
  <pre class="lang-php prettyprint-override"><code>public function preInsert(PropelPDO $con = null)
  {
      $this-&gt;setCreationDate(time());
      return true;
  }
  </code></pre>
  
  <p>the resulting time is still UTC+1. If I set the time using a <code>DateTime</code> object instead of a Unix timestamp:</p>
  
  <pre class="lang-php prettyprint-override"><code>public function preInsert(PropelPDO $con = null)
  {
      $this-&gt;setCreationDate(new DateTime('now', new DateTimeZone('UTC')));
      return true;
  }
  </code></pre>
  
  <p>I get the correct UTC time in the database.</p>
  
  <p>I checked in the code and saw that the bahavior sets the time passing the Unix timestamp, hence resulting in UTC+1 on the database.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Is it possible to configure the Propel timestampable behavior in UTC?</li>
  <li>If it is not, where does Propel set the date format/time zone? Is using a <code>pre</code> hook and passing a <code>DateTime</code> object with the time zone specified the only way to get UTC time in the database (other than implementing a custom behavior)?</li>
  <li>Also, if I can't configure the timezone of the Propel timestampable behavior, what's the whole purpose of it in a first place? (it is a pretty common practice to set UTC timestamps in a database)</li>
  </ol>