I use this method to get local time:
Calendar cal = Calendar.getInstance(); String time= new SimpleDateFormat("dd MMM yyyy HH:mm:ss").format(cal.getTime());
My problem is that in the afternoon this method returns me, for example, "11:15", but already "23:15". I hope my desc does not confuse.
I want to get back daily values, such as: 12: MM, 13: MM, 14: MM..etc goes to 23: MM.,.
What should i change?
source share