You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
测试类:
public static final String TIMEZONE_FORMAT = "yyyy-MM-dd'T'HH:mm:ssXXX";
public class ShipmentPlanVO {
....
}
main方法主要部分
String str2 = "{"id":1480666,"from":"2023-06-05T20:31:00-06:00"}";
JSONObject p1 = JSON.parseObject(str2);
ShipmentPlanVO p2 = p1 .toJavaObject(ShipmentPlanVO.class);
System.out.println(JSON.toJSONString(p2));
实际输出:{"from":"2023-06-06T09:31:00+08:00","id":"1480666"}
正确的时间from应该是: 2023-06-06T10:31:00+08:00, 实际输出早了1个小时
The text was updated successfully, but these errors were encountered: