-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.11
-
Component/s: None
-
None
-
Environment:Ubuntu Mono JIT compiler version 2.6.7 (Debian 2.6.7-3ubuntu1
I get the following failed test:
MongoDB.BsonUnitTests.BsonTypeMapperTests.TestMapString:
Expected: 2010-01-02 00:00:00.000
But was: 2010-01-02 05:00:00.000
This fixes the test on mono (run through nunit-console). Its probably not the right answer:
zippy@maya-gwapa:~/src/mongo-csharp$ git diff
diff --git a/BsonUnitTests/ObjectModel/BsonTypeMapperTests.cs b/BsonUnitTests/ObjectModel/BsonTypeMapperTests.cs
index c5f0a28..a2133b5 100644
— a/BsonUnitTests/ObjectModel/BsonTypeMapperTests.cs
+++ b/BsonUnitTests/ObjectModel/BsonTypeMapperTests.cs
@@ -457,7 +457,7 @@ namespace MongoDB.BsonUnitTests {
var bsonBoolean = (BsonBoolean) BsonTypeMapper.MapToBsonValue("1", BsonType.Boolean);
Assert.AreEqual(true, bsonBoolean.Value);
var bsonDateTime = (BsonDateTime) BsonTypeMapper.MapToBsonValue("2010-01-02", BsonType.DateTime);
- Assert.AreEqual(new DateTime(2010, 1, 2), bsonDateTime.Value);
+ Assert.AreEqual(new DateTime(2010, 1, 2), bsonDateTime.Value.ToLocalTime());
var bsonDouble = (BsonDouble) BsonTypeMapper.MapToBsonValue("1.2", BsonType.Double);
Assert.AreEqual(1.2, bsonDouble.Value);
var bsonInt32 = (BsonInt32) BsonTypeMapper.MapToBsonValue("1", BsonType.Int32);