I want to calculate time in Asia/Dubai timezone from the time of Asia/Kolkata using java 8 Date Time API
<pre><code> ZoneId dubai = ZoneId.of("Asia/Dubai");
 LocalDate localDate = LocalDate.now();
 LocalTime localTime = LocalTime.now();
 ZonedDateTime zonedDateTime = ZonedDateTime.of(localDate, localTime, dubai);
System.out.println("Dubai Tiime:"+zonedDateTime);
</code></pre>

<p>Above code is still printing the time of my current zone (i.e Asia/Kolkata)</p>

<p>Also i tried the following code to achieve the same but it is also printing time in my current zone(Asia/Kolkata): </p>

<pre><code>ZoneOffset offset = ZoneOffset.of("+04:00");
LocalDateTime localDateTime = LocalDateTime.now();
OffsetDateTime plusFour = OffsetDateTime.of(localDateTime, offset);
System.out.println("Dubai Time :"+plusFour);
</code></pre>

<p>I am unable to figure out why its not providing desired result.</p>