title: Determining Local Time in another Timezone
body: <p>How can I determine the current date and time of various countries using a PERL script that executes on a server in the US? For example, getDTnow() should determine the current date and time on the server and use that to return the date and time of various countries.</p>
  
  <p><strong>P.S</strong>: It would be great if this can be done using only the built-in functions, without any external modules.</p>
  
  <hr>
  
  <p><strong>Conclusion</strong>: Date maths is <em>[use swear word here]</em> complicated and easy to get wrong. Other perl gurus on IRC, groups and other parts of the net confirmed what <strong><em>Ether</em></strong> had been advicing me - use <a href="http://search.cpan.org/perldoc?DateTime" rel="nofollow">DateTime</a>. <strong><em>DVK</em></strong>'s solution is also pretty neat for those of you who don't mind messing with the perl environment. (<strong>Note</strong>: Though on windows, the caveats section of the <a href="http://perldoc.perl.org/Time/Piece.html" rel="nofollow">Time::Piece docs</a> says one should be careful while '<em>Setting $ENV{TZ} in Threads on Win32</em>').</p>