67. Getting local date-time in all available time zones

The solution to this problem can be obtained by following these steps:

  1. Get the local date-time.
  2. Get the available time zones.
  3. Before JDK 8, use SimpleDateFormat with the setTimeZone() method.
  4. Starting with JDK 8, use ZonedDateTime.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset