2323
2424using System ;
2525using System . Collections . Generic ;
26+ using System . Globalization ;
2627using System . Linq ;
2728using System . Reflection ;
2829using JetBrains . Annotations ;
@@ -348,7 +349,7 @@ internal static void BindParameter(ISQLiteApi isqLite3Api, IDbStatement stmt, in
348349 }
349350 else
350351 {
351- string val = ( ( DateTime ) value ) . ToUniversalTime ( ) . ToString ( "yyyy-MM-ddTHH:mm:ss.fffffffZ" ) ;
352+ string val = ( ( DateTime ) value ) . ToUniversalTime ( ) . ToString ( "yyyy-MM-ddTHH:mm:ss.fffffffZ" , CultureInfo . InvariantCulture ) ;
352353 isqLite3Api . BindText16 ( stmt , index , val , - 1 , NegativePointer ) ;
353354 }
354355 }
@@ -365,7 +366,7 @@ internal static void BindParameter(ISQLiteApi isqLite3Api, IDbStatement stmt, in
365366 }
366367 else
367368 {
368- string val = ( ( ISerializable < DateTime > ) value ) . Serialize ( ) . ToUniversalTime ( ) . ToString ( "yyyy-MM-ddTHH:mm:ss.fffffffZ" ) ;
369+ string val = ( ( ISerializable < DateTime > ) value ) . Serialize ( ) . ToUniversalTime ( ) . ToString ( "yyyy-MM-ddTHH:mm:ss.fffffffZ" , CultureInfo . InvariantCulture ) ;
369370 isqLite3Api . BindText16 ( stmt , index , val , - 1 , NegativePointer ) ;
370371 }
371372 }
@@ -471,7 +472,7 @@ private object ReadCol(IDbStatement stmt, int index, ColType type, Type clrType)
471472 {
472473 return new DateTime ( _sqlitePlatform . SQLiteApi . ColumnInt64 ( stmt , index ) , DateTimeKind . Utc ) ;
473474 }
474- return DateTime . Parse ( _sqlitePlatform . SQLiteApi . ColumnText16 ( stmt , index ) ) ;
475+ return DateTime . Parse ( _sqlitePlatform . SQLiteApi . ColumnText16 ( stmt , index ) , CultureInfo . InvariantCulture ) ;
475476 }
476477 if ( clrType == typeof ( DateTimeOffset ) )
477478 {
@@ -486,7 +487,7 @@ private object ReadCol(IDbStatement stmt, int index, ColType type, Type clrType)
486487 }
487488 else
488489 {
489- value = DateTime . Parse ( _sqlitePlatform . SQLiteApi . ColumnText16 ( stmt , index ) ) ;
490+ value = DateTime . Parse ( _sqlitePlatform . SQLiteApi . ColumnText16 ( stmt , index ) , CultureInfo . InvariantCulture ) ;
490491 }
491492 return Activator . CreateInstance ( clrType , value ) ;
492493 }
0 commit comments