problem on java calendar function
问题 I declared Calendar and SimpleDateFormat like this: calendar = Calendar.getInstance(TimeZone.getTimeZone("Malaysia")); final SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MMMMM.dd hh:mm aaa"); or: calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+08:00")); Then I call this: sdf.format(calendar.getTime()); but result is not in correct time zone (+8 hours). What could be the problem? 回答1: Unless you are going to perform Date/Time related calculations, there is no point in