Java Data Type How to - Get current time in Asia/Kolkata


We would like to know how to get current time in Asia/Kolkata.


/*from ww  w  .  j  a  va2  s .  c  om*/
import java.time.LocalTime;
import java.time.ZoneId;

public class Main {
    public static void main(String[] args) {
      // Current time in "Asia/Kolkata"
      LocalTime timeKolkata ="Asia/Kolkata"));
      System.out.println("Current Time in IST=" + timeKolkata);

The code above generates the following result.