public abstract class TimeZoneUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
validateTimeZoneId(String timeZoneId)
Validates the specified time zone ID.
|
static String |
validateTimeZoneId(String timeZoneId,
String defaultTimeZoneId)
Validates the specified time zone ID.
|
public static String validateTimeZoneId(String timeZoneId)
TimeZone.getAvailableIDs().
If the time zone ID is not valid or null, the time zone ID of the system will be returned.timeZoneId - the time zone ID to be validated (can be null)public static String validateTimeZoneId(String timeZoneId, String defaultTimeZoneId)
TimeZone.getAvailableIDs().
If the time zone ID is not valid, the default time zone ID will be validated. If even the default time zone ID
is not valid, the time zone ID of the system will be returned. So even if one of the time zones is null,
a valid time zone ID will be returned.timeZoneId - the time zone ID to be validated (can be null)defaultTimeZoneId - the default time zone ID (can be null)Copyright © 2017 bremersee.org. All rights reserved.