Skip to content
Advertisement

how to get Indian Time Standard from in java?

I want to know date and time in Indian standard time and I don’t want to use my system time and date. I have never used Network Transfer Protocol (NTP) but by browsing through internet i think ntp can do the jop.

Advertisement

Answer

An easier option might be to use JodaTime, so that you could do something like this

DateTime dateTimeIndia = new DateTime(DateTimeZone.forID("Asia/Kolkata");
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement