Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
add testcase for issue #1450
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Oct 1, 2017
1 parent ec7b296 commit 6264ced
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/java/com/alibaba/json/bvt/issue_1400/Issue1450.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.alibaba.json.bvt.issue_1400;

import com.alibaba.fastjson.JSON;
import junit.framework.TestCase;

import java.time.LocalDateTime;

public class Issue1450 extends TestCase {
public void test_for_issue() throws Exception {
LocalDateTime localDateTime = LocalDateTime.of(2018, 8, 31, 15, 26, 37, 1);
String json = JSON.toJSONStringWithDateFormat(localDateTime, "yyyy-MM-dd HH:mm:ss");//2018-08-31T15:26:37.000000001
assertEquals("\"2018-08-31 15:26:37\"", json);
}
}

0 comments on commit 6264ced

Please sign in to comment.