Skip to content

Commit

Permalink
Update ConvertFromEntry_DateTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamescaper committed Dec 20, 2024
1 parent 3c6ab0f commit c87701f
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,10 @@ public void ConvertToEntry_DateTime(DynamoDBEntryConversion conversion)
[DynamicData((nameof(DynamoDBEntryConversions)))]
public void ConvertFromEntry_DateTime(DynamoDBEntryConversion conversion)
{
// DynamoDBEntryConversion returns local DateTime by default:
// https://github.com/aws/aws-sdk-net/issues/1450
var entry = new Primitive("2024-07-03T01:31:47.000Z", false);
var actualDateTime = conversion.ConvertFromEntry<DateTime>(entry);
var utcDateTime = actualDateTime.ToUniversalTime();
var expectedDateTime = new DateTime(2024, 07, 03, 01, 31, 47, DateTimeKind.Utc);
Assert.AreEqual(expectedDateTime, utcDateTime);
Assert.AreEqual(expectedDateTime, actualDateTime);
}

[DataTestMethod]
Expand Down

0 comments on commit c87701f

Please sign in to comment.