I am creating an android app and I need to get the EXACT date and time using android studio. There are many questions which have solutions to this, but I realised that all of them give the phone's time which can be edited by the user. I need the exact world-standard time.
Currently, the code I'm using is this:
DateFormat dfgmt = new java.text.SimpleDateFormat("yyyy-MM-dd kk:mm:ss");
dfgmt.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
String nowTime = dfgmt.format(new Date());
But this is giving me the time which is at times tweaked by the user. Anyone has a way to get the exact time?