package com.alibaba.json.bvt.issue_2100;

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

public class Issue2156 extends TestCase {
    public void test_for_issue() throws Exception {
        java.sql.Date date = java.sql.Date.valueOf("2018-07-15");
        String str = JSON.toJSONStringWithDateFormat(date, JSON.DEFFAULT_DATE_FORMAT);
        assertEquals("\"2018-07-15\"", str);
    }

    public void test_for_issue_time() throws Exception {
        java.sql.Time date = java.sql.Time.valueOf("12:13:14");
        String str = JSON.toJSONStringWithDateFormat(date, JSON.DEFFAULT_DATE_FORMAT);
        assertEquals("\"12:13:14\"", str);
    }
}

@@ -107,49 +107,268 @@
 e;%0A%0A
-public class Issue2156 extends TestCase %7B
+import java.util.Locale;%0Aimport java.util.TimeZone;%0A%0Apublic class Issue2156 extends TestCase %7B%0A    protected void setUp() throws Exception %7B%0A        JSON.defaultTimeZone = TimeZone.getTimeZone(%22Asia/Shanghai%22);%0A        JSON.defaultLocale = Locale.CHINA;%0A    %7D%0A
 %0A   

fix testcase