Java doubt on current time | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Java doubt on current time

I'm new to coding i have got following code from some books... Following code gives GMT time but i want India time to show what to alter in the code to get India time which has GMT (+5.30) https://code.sololearn.com/c4N4OQmNBCZS/?ref=app

8th Oct 2019, 3:49 PM
KAAMIL AHAMADH S
KAAMIL AHAMADH S - avatar
1 Answer
+ 1
GregorianCalendar date = new GregorianCalendar( TimeZone.getTimeZone("Asia/Kolkata") );
8th Oct 2019, 11:51 PM
zemiak