title: Why does time() differ from a date time object
body: <p>I'm slightly confused what's going on. I created a variable that stores the result of time() and I created a DateTime object with parameters  "now", and new DateTimeZone and set it to mine. Next I used the getTimestamp method on the DateTime objects. I echoed both the time() and the DateTime timestamp out. They were both the same. When I went to store it in a cookie. They gave me very different times. The time method was correct but the DateTime ended up with year 2069. Anyone know what's going on?</p>
  
  <p>Code</p>
  
  <pre><code>$time = time();
  $datetime = new DateTime("now", new DateTimeZone("America/Chicago"));
  $datetime = $datetime-&gt;getTimestamp();
  echo $time."&lt;br /&gt;";
  echo $datetime;
  
  setcookie("T1","Time1",$time);
  setcookie("T2","Time2",$datetime);
  </code></pre>