Java TimeZone conversion issue
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/14705561/java-timezone-why-offset-is-needed">Java Timezone: why Offset is needed</a>  </p>
</blockquote>



<p>My system timezone is <code>Asia/Calcutta</code>.My requirment is to convert time in one timezone to other.</p>

<pre><code>long l = 1223123123232l;// long value representing the date.
TimeZone tz = TimeZone.getTimeZone("Australia/Sydney");// First Time zone
long tzOff = tz.getOffset(l);
java.util.Date d = new Date(l-tzOff);   // WHY THIS??
DateFormat df = new SimpleDateFormat("dd MMM yyyy HH:mm:ss z");
df.setTimeZone(TimeZone.getTimeZone("Africa/Asmara"));// Required Time zone
String s = df.format(d);
System.out.println(s);
</code></pre>

<p>What is wrong with my code?</p>
