public class TimeZoneUtils extends Object
Modifier and Type | Method and Description |
---|---|
static TimeZone |
parseTimeZone(String str)
Parse a string into the corresponding
TimeZone using the format described by
TimeZone.getTimeZone(String) . |
public static TimeZone parseTimeZone(String str)
TimeZone
using the format described by
TimeZone.getTimeZone(String)
.
The value of the timeZone
can be any string accepted by java's TimeZone.getTimeZone(String)
method. For example "America/Los_Angeles" or "GMT+10".
str
- the string to parse into a valid TimeZone
.TimeZone
corresponding to the input stringIllegalArgumentException
- thrown when the string is not a valid TimeZone textual
representation.Copyright © 2013–2022. All rights reserved.