I am trying to get the current time in android app. here is my code:
Calendar cal = Calendar.getInstance();
Date date = new Date();
cal.setTime(date);
System.out.println(cal.get(Calendar.DAY_OF_WEEK));
today is Wednesday. the output should be 3. but it is 4.
can someone help me with this?