Package net.logstash.logback.util
Class TimeZoneUtils
java.lang.Object
net.logstash.logback.util.TimeZoneUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimeZoneparseTimeZone(String str) Parse a string into the correspondingTimeZoneusing the format described byTimeZone.getTimeZone(String).
-
Method Details
-
parseTimeZone
Parse a string into the correspondingTimeZoneusing the format described byTimeZone.getTimeZone(String).The value of the
timeZonecan 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
TimeZonecorresponding to the input string - Throws:
IllegalArgumentException- thrown when the string is not a valid TimeZone textual representation.
-