Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;

public class CronEvalTool extends LoggingAwareCommand {

Expand All @@ -31,7 +30,7 @@ public static void main(String[] args) throws Exception {
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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: I think it would be a bit more obvious to explicitly call DateTimeZone.getDefault() instead of null.
Since that is what Joda does with the null value.
http://joda-time.sourceforge.net/apidocs/src-html/org/joda/time/DateTimeZone.html#line.301

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! the recommendation is forbidden API ..never mind.


private final OptionSpec<Integer> countOption;
private final OptionSpec<String> arguments;
Expand Down