title: perl "DateTime" module print wrong time
body: <p>I am using <a href="http://search.cpan.org/~drolsky/DateTime-0.78/lib/DateTime.pm" rel="nofollow">DateTime</a> module. however it is providing wrong time. Please consider below code:</p>
  
  <pre><code>#!/usr/bin/perl -w
  use strict;
  
  use Time::localtime;
  my $now = ctime();
  print $now."\n";
  
  print "------------------------------\n";
  
  use DateTime;
  my $dt = DateTime-&gt;now;
  print $dt."\n";
  </code></pre>
  
  <p>And its output is:</p>
  
  <pre><code>Wed Dec 26 22:11:52 2012
  ------------------------------
  2012-12-27T06:11:52
  </code></pre>
  
  <p>so, As you can see, the <code>DateTime</code> output is leading by 8 hours which is wrong. Here is the Linux <code>date</code> command output:</p>
  
  <pre><code># date
  Wed Dec 26 22:13:17 PST 2012
  </code></pre>
  
  <p>So, the <code>date</code> command output matches with that of <code>time::localtime</code> output. </p>
  
  <p>could you help me understand where I am going wrong in using <code>DateTime</code> module.</p>
  
  <p>-Thanks.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>from hte CPAN documentation:</p>
  
  <pre><code>DateTime-&gt;now( ... )
  
  This class method is equivalent to calling from_epoch() with the value returned from Perl's time() function. Just as with the new() method, it accepts "time_zone" and "locale" parameters.
  
  By default, the returned object will be in the UTC time zone.
  </code></pre>
  
  <p>So, It seems that the time returned is in UTC. However, the timezone I am in in PST. Probably thats why I see the different time. </p>