@@ -0,0 +1,1935 @@
+package com.alibaba.json.bvt.bug;%0A%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Calendar;%0Aimport java.util.Date;%0A%0Aimport org.junit.Assert;%0A%0Aimport com.alibaba.fastjson.JSON;%0Aimport com.alibaba.fastjson.serializer.JSONSerializer;%0Aimport com.alibaba.fastjson.serializer.SerializeWriter;%0Aimport com.alibaba.fastjson.serializer.SerializerFeature;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class Bug_for_issue_331 extends TestCase %7B%0A    public void test_for_issue() throws Exception %7B%0A        %0A        SimpleDateFormat format = new SimpleDateFormat(%22yyyy-MM-dd%22);%0A        Date date = format.parse(%222015-05-23%22);%0A%0A        Calendar c = Calendar.getInstance();%0A        c.setTime(date);%0A%0A        Model original = new Model();%0A        original.setDate(date);%0A        original.setCalendar(c);%0A        %0A        String json = JSON.toJSONString(original, SerializerFeature.UseISO8601DateFormat);%0A%0A        System.out.println(json); //V1.2.4 %E8%BE%93%E5%87%BA%7B%22calendar%22:%222015-05-23%22,%22date%22:%222015-05-23%22%7D , V1.2.6 %E8%BE%93%E5%87%BA%7B%22calendar%22:%222015-05-23+08:00%22,%22date%22:%222015-05-23+08:00%22%7D%0A%0A        Model actual = JSON.parseObject(json, Model.class);%0A%0A        Assert.assertNotNull(actual);%0A        Assert.assertNotNull(actual.getDate());%0A        Assert.assertNotNull(actual.getCalendar());%0A%0A        Assert.assertEquals(%22%E4%B8%8E%E5%BA%8F%E5%88%97%E5%8C%96%E5%89%8D%E6%AF%94%E8%BE%83%E4%B8%8D%E7%9B%B8%E7%AD%89%22, original.getDate(), actual.getDate());%0A%0A        Assert.assertEquals(%22%E5%BA%8F%E5%88%97%E5%8C%96%E5%90%8E%E7%9A%84Date %E5%92%8C Calendar %E4%B8%8D%E7%9B%B8%E7%AD%89%22, actual.getDate(), actual.getCalendar().getTime());%0A    %7D%0A    %0A    public static class Model %7B%0A        private Date date;%0A        private Calendar calendar;%0A        %0A        public Date getDate() %7B%0A            return date;%0A        %7D%0A        %0A        public void setDate(Date date) %7B%0A            this.date = date;%0A        %7D%0A        %0A        public Calendar getCalendar() %7B%0A            return calendar;%0A        %7D%0A        %0A        public void setCalendar(Calendar calendar) %7B%0A            this.calendar = calendar;%0A        %7D%0A        %0A        %0A    %7D%0A%7D%0A

add testcase for issue 331. https://github.com/alibaba/fastjson/issues/331