Home » Tip Bank » Java
  • Comment on this Article
Language: Java
Expertise: Intermediate
Mar 20, 2019
  • facebook
  • twitter
  • in
  • Email

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

Get All the Available Time Zones

Before Java 8, this was obtained as a String[] via TimeZone class:

String[] zoneIds = TimeZone.getAvailableIDs();

Java 8 comes with a new approach via java.time.ZoneId class:

Set zoneIds = ZoneId.getAvailableZoneIds();
Octavia Anghel
 
Submit a Tip
Browse "Java" Tips
Browse All Tips
javascriptweekly.com
codeschool.com