Package net.logstash.logback.util
Class TimeZoneUtils
java.lang.Object
net.logstash.logback.util.TimeZoneUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimeZone
parseTimeZone
(String str) Parse a string into the correspondingTimeZone
using the format described byTimeZone.getTimeZone(String)
.
-
Method Details
-
parseTimeZone
Parse a string into the correspondingTimeZone
using the format described byTimeZone.getTimeZone(String)
.The value of the
timeZone
can be any string accepted by java'sTimeZone.getTimeZone(String)
method. For example "America/Los_Angeles" or "GMT+10".- Parameters:
str
- the string to parse into a validTimeZone
.- Returns:
- the
TimeZone
corresponding to the input string - Throws:
IllegalArgumentException
- thrown when the string is not a valid TimeZone textual representation.
-