title: Perl: How to convert a unix timestamp+timezone into local time
body: <p>the basic question is in the header: I have a unix timestamp and a timezone, e.g. "America/Caracas" and I would like to convert it to the timezone's local time.</p>
  
  <p>Searching through stackoverflow, I found someone else <a href="https://stackoverflow.com/questions/5397775/return-local-time-from-unix-timestamp-with-timezone-identifier-in-php">asking pretty much the same question</a>, however, the provided answer code</p>
  
  <pre><code>$t = new DateTime();
  $t-&gt;setTimestamp( $time=time() );
  $t-&gt;setTimeZone(new DateTimeZone("America/Denver"));
  print $t-&gt;format(DateTime::RFC850);
  </code></pre>
  
  <p>does not work (anymore?). DateTime() does not allow me to set a timestamp; i did look through the DateTime source, but also did not see, where i could hook up my own timestamp. Any thoughts/help?</p>
  
  <p>Many thanks in advance!</p>