I am trying to get today\'s Year, Month and Date using following code;
Calendar calendar = Calendar.getInstance(); int thisYear = calendar.get(Calendar.YEAR); L
Try to use:
Date dt = new Date(); dt.getYear(); dt.getMonth(); dt.getDay();
and see if you get the same result. If so, your system date is probably out of sync. Check the Date class documentation for more details: