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

Commit ca68d5a

Browse files
committed
Merge pull request #231 from andreabalducci/master
Fixed datetime conversion
2 parents 0a43ce8 + 1cf4554 commit ca68d5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ServiceStack.OrmLite.SqlServer/SqlServerOrmLiteDialectProvider.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.Data;
44
using System.Data.SqlClient;
5+
using System.Globalization;
56
using System.IO;
67
using System.Text;
78
using ServiceStack.Text;
@@ -134,7 +135,7 @@ public override string GetQuotedValue(object value, Type fieldType)
134135
if (_ensureUtc && dateValue.Kind == DateTimeKind.Local)
135136
dateValue = dateValue.ToUniversalTime();
136137
const string iso8601Format = "yyyyMMdd HH:mm:ss.fff";
137-
return base.GetQuotedValue(dateValue.ToString(iso8601Format), typeof(string));
138+
return base.GetQuotedValue(dateValue.ToString(iso8601Format,CultureInfo.InvariantCulture) , typeof(string));
138139
}
139140
if (fieldType == typeof(bool))
140141
{
@@ -253,4 +254,4 @@ public override string GetDropForeignKeyConstraints(ModelDefinition modelDef)
253254
return sb.ToString();
254255
}
255256
}
256-
}
257+
}

0 commit comments

Comments
 (0)