From a150e1ba5797ea94e70acfb57c09d7adc014b836 Mon Sep 17 00:00:00 2001 From: Jarred Li Date: Sun, 15 Apr 2012 12:23:25 +0800 Subject: [PATCH] change time local as JANSI does not support GBK --- .../java/org/springframework/roo/shell/AbstractShell.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/roo/shell/AbstractShell.java b/src/main/java/org/springframework/roo/shell/AbstractShell.java index 1082985a..28f4eac0 100644 --- a/src/main/java/org/springframework/roo/shell/AbstractShell.java +++ b/src/main/java/org/springframework/roo/shell/AbstractShell.java @@ -14,6 +14,7 @@ import java.net.URL; import java.text.DateFormat; import java.util.Collection; import java.util.Date; +import java.util.Locale; import java.util.Map.Entry; import java.util.Set; import java.util.TreeSet; @@ -325,7 +326,9 @@ public abstract class AbstractShell extends AbstractShellStatusPublisher impleme @CliCommand(value = { "date" }, help = "Displays the local date and time") public String date() { - return DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL).format(new Date()); + return DateFormat.getDateTimeInstance( + DateFormat.FULL, DateFormat.FULL,Locale.US) + .format(new Date()); } //@CliCommand(value = { "flash test" }, help = "Tests message flashing")