Skip to content

Commit

Permalink
536:StaticTool的ChangeType方法修正DateTime的毫秒丢失问题。(2018-12-06)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyq1162 committed Dec 6, 2018
1 parent ee16297 commit 8cddb43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tool/StaticTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ public static object ChangeType(object value, Type t)
}
else if (t.IsValueType)
{
if (t.Name == "DateTime")
{
return Convert.ChangeType(value, t);//这里用value,避免丢失毫秒
}
if (t.Name == "Guid")
{
return new Guid(strValue);
Expand Down

0 comments on commit 8cddb43

Please sign in to comment.