Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级49版本后,日期转换出错 #524

Closed
fjay opened this issue Sep 16, 2013 · 4 comments
Closed

升级49版本后,日期转换出错 #524

fjay opened this issue Sep 16, 2013 · 4 comments
Assignees
Milestone

Comments

@fjay
Copy link
Member

fjay commented Sep 16, 2013

异常堆栈如下:

--- '2013-09-14T12:33:14' to java.util.Date
org.nutz.castor.FailToCastObjectException: '2013-09-14T12:33:14' to java.util.Date
at org.nutz.castor.castor.DateTimeCastor.toDate(DateTimeCastor.java:14)
at org.nutz.castor.castor.String2Datetime.cast(String2Datetime.java:12)
at org.nutz.castor.castor.String2Datetime.cast(String2Datetime.java:1)
at org.nutz.castor.Castors.cast(Castors.java:227)
at org.nutz.castor.Castors.castTo(Castors.java:292)
at org.nutz.lang.Lang.map2Object(Lang.java:1123)

之前的版本是支持2013-09-14T12:33:14的,49不支持了…

@zozoh
Copy link
Member

zozoh commented Sep 16, 2013

你是自己配置 DefaultCastorSetting 了吧? 怎么配置的?

@fjay
Copy link
Member Author

fjay commented Sep 16, 2013

没有配置,都是默认的,48版本无此问题

你直接用字符串2013-09-14T12:33:14转换试试看
就报错了

@ghost ghost assigned zozoh Sep 17, 2013
zozoh added a commit that referenced this issue Sep 17, 2013
@zozoh
Copy link
Member

zozoh commented Sep 17, 2013

还会支持

 2013-09-14T12:33:14+08:00
 2013-09-14T12:33:14+08
 2013-09-14T12:33:14-8
 2013-09-14 12:33:14+08:00
 2013-09-14 12:33:14+08
 2013-09-14 12:33:14-8

@zozoh zozoh closed this as completed Sep 17, 2013
@enzozhong
Copy link
Contributor

B.52 对于时间"2013-09-14T12:33"也是不支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants