Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 808663b

Browse files
committed
Merge pull request #462 from yuinlin/FixSqlServerTestFailure
fix DateTimeOffsetConverter; was causing sqlserver datetimeoffset uni…
2 parents 31cb13d + 57459ae commit 808663b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ServiceStack.OrmLite/Converters/DateTimeOffsetConverter.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public override object FromDbValue(Type fieldType, object value)
2525
var moment = DateTimeOffset.Parse(strValue, null, DateTimeStyles.RoundtripKind);
2626
return moment;
2727
}
28+
if (value.GetType() == fieldType)
29+
{
30+
return value;
31+
}
2832
if (value is DateTime)
2933
{
3034
return new DateTimeOffset((DateTime)value);

0 commit comments

Comments
 (0)