// Get the current time in London
Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("London"));
int hour12 = cal.get(Calendar.HOUR);
int minutes = cal.get(Calendar.MINUTE);
int seconds = cal.get(Calendar.SECOND);
int am = cal.get(Calendar.AM_PM);
// Get the current hour-of-day at GMT
cal.setTimeZone(TimeZone.getTimeZone("GMT"));
int hour24 = cal.get(Calendar.HOUR_OF_DAY);
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment