[ https://issues.apache.org/jira/browse/GEODE-8447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17262923#comment-17262923 ]
ASF GitHub Bot commented on GEODE-8447: --------------------------------------- jchen21 commented on a change in pull request #5891: URL: https://github.com/apache/geode/pull/5891#discussion_r555323938 ########## 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: The query result can contain either `java.util.Date` or `java.sql.Date`. `java.util.Date` is tested in line 133. ---------------------------------------------------------------- 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)