Watcher: Use joda method to get local TZ (#35608)
This commit switches from using java util's default timezone method to using joda. The former can cause problems when the string representation of the timezone is unknown to joda. closes #35518
This commit is contained in:
parent
22933ebcd5
commit
3c03975ce3
|
@ -20,7 +20,6 @@ import org.joda.time.format.DateTimeFormatter;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
public class CronEvalTool extends LoggingAwareCommand {
|
||||
|
||||
|
@ -31,7 +30,7 @@ public class CronEvalTool extends LoggingAwareCommand {
|
|||
private static final DateTimeFormatter UTC_FORMATTER = DateTimeFormat.forPattern("EEE, d MMM yyyy HH:mm:ss")
|
||||
.withZone(DateTimeZone.UTC).withLocale(Locale.ROOT);
|
||||
private static final DateTimeFormatter LOCAL_FORMATTER = DateTimeFormat.forPattern("EEE, d MMM yyyy HH:mm:ss Z")
|
||||
.withZone(DateTimeZone.forTimeZone(TimeZone.getDefault()));
|
||||
.withZone(DateTimeZone.forTimeZone(null));
|
||||
|
||||
private final OptionSpec<Integer> countOption;
|
||||
private final OptionSpec<String> arguments;
|
||||
|
|
Loading…
Reference in New Issue