I am trying to get the current date and time and create a collection that contains my current time/date and the next hour and so on.
I am quite a beginner in Java and facing two problems. The output is :
Sat Oct 23 00:07:27 CET 1937
Sat Oct 23 01:07:27 CET 1937
- How can I get the date/time without CET 1973?
- Why the weekday (sat) is not the actual one (Monday) (2 days earlier)?
Source Code is :
SimpleDateFormat format1 = new SimpleDateFormat("EEE, d MMM HH:mm");
System.out.println(format1.getCalendar().getTime());
format1.getCalendar().add(Calendar.HOUR, 1);
System.out.println(format1.getCalendar().getTime());