[ 
https://issues.apache.org/jira/browse/GEODE-8447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17262904#comment-17262904
 ] 

ASF GitHub Bot commented on GEODE-8447:
---------------------------------------

jinmeiliao commented on a change in pull request #5891:
URL: https://github.com/apache/geode/pull/5891#discussion_r555294957



##########
File path: 
geode-core/src/test/java/org/apache/geode/management/internal/json/QueryResultFormatterTest.java
##########
@@ -119,16 +120,20 @@ public void testPrimitives() throws Exception {
 
     QueryResultFormatter stringResult = new 
QueryResultFormatter(100).add(RESULT, "String");
     checkResult(stringResult, 
"{\"result\":[[\"java.lang.String\",\"String\"]]}");
+  }
 
-    Date date = new Date(0);
-    String expectedString =
-        new 
SimpleDateFormat(QueryResultFormatter.DATE_FORMAT_PATTERN).format(date);
+  @Test
+  public void testDateTimes() throws Exception {
+    long time = System.currentTimeMillis();
+    Date date = new Date(time);
+    SimpleDateFormat format = DateFormatter.createLocalizedDateFormat();
+    String expectedString = format.format(date);
     QueryResultFormatter javaDateResult =
         new QueryResultFormatter(100).add(RESULT, date);
     checkResult(javaDateResult,
         "{\"result\":[[\"java.util.Date\",\"" + expectedString + "\"]]}");
 
-    java.sql.Date sqlDate = new java.sql.Date(0);
+    java.sql.Date sqlDate = new java.sql.Date(time);

Review comment:
       This test is only to make sure our QueryResultFormatter can format 
`java.sql.Date` object. It's used to format customer region data, they could 
use any date time object.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Pulse should localize “java.util.Date” in the displayed query result
> --------------------------------------------------------------------
>
>                 Key: GEODE-8447
>                 URL: https://issues.apache.org/jira/browse/GEODE-8447
>             Project: Geode
>          Issue Type: Bug
>          Components: management
>    Affects Versions: 1.12.0
>            Reporter: Jinmei Liao
>            Assignee: Jinmei Liao
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.1, 1.14.0, 1.13.1
>
>         Attachments: CreatedOn-lastUpdated.JPG, Date-GF96.JPG
>
>
> In previous versions of Geode, Pulse used to show Dates in localized string, 
> now it's not. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to