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.

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");

Leave a Reply

Your email address will not be published. Required fields are marked *