I have a string, I need to check whether it is a standard time zone identifier or not. I am not sure which method I need to use.
String timeZoneToCheck = \"UTC\"
it's simple just use ZoneId.of("Asia/Kolkata")
ZoneId.of("Asia/Kolkata")
try { ZoneId.of("Asia/Kolkataa"); } catch (Exception e) { e.printStackTrace(); }
if your insert invalid time zone it will throw exception
**java.time.zone.ZoneRulesException: Unknown time-zone ID: Asia/Kolkataa**