ServiceStack日期反序列化错误



在ServiceStack.Text版本4.0.38 上

  • ServiceStack.Text.Common.DateTimeSerializer.ParseShortestXsdDateTime("9/10/2015")工作

  • ServiceStack.Text.Common.DateTimeSerializer.ParseShortestXsdDateTime("09/10/2015")不工作输入字符串的格式不正确

  • ServiceStack.Text.Common.DateTimeSerializer.ParseShortestXsdDateTime("2015年10月10日")不工作相同错误

这可能与日期的长短有关,不确定。。。任何人都知道为什么在最近的两起案件中失败了。。。它适用于以前的版本。。。

感谢

我强烈建议使用一种真正明确的方法将日期存储在字符串中,即:

"2015-09-10"

最新更新