@@ -25,8 +25,8 @@ public void MemberPermissionBody_WithRealDates_StillBinds()
2525 var model = DeserializeMemberPermission (
2626 @"{""memberId"":""12345678"",""permissionId"":5,""access"":1,""startDate"":""2026-01-15T00:00:00"",""endDate"":""2026-06-30T00:00:00""}" ) ;
2727
28- Assert . Equal ( new DateTime ( 2026 , 1 , 15 , 0 , 0 , 0 , DateTimeKind . Local ) , model . StartDate ) ;
29- Assert . Equal ( new DateTime ( 2026 , 6 , 30 , 0 , 0 , 0 , DateTimeKind . Local ) , model . EndDate ) ;
28+ Assert . Equal ( new DateTime ( 2026 , 1 , 15 , 0 , 0 , 0 , DateTimeKind . Unspecified ) , model . StartDate ) ;
29+ Assert . Equal ( new DateTime ( 2026 , 6 , 30 , 0 , 0 , 0 , DateTimeKind . Unspecified ) , model . EndDate ) ;
3030 }
3131
3232 [ Fact ]
@@ -51,7 +51,7 @@ public void MemberPermission_RoundTripsThroughSerialization()
5151 MemberId = "12345678" ,
5252 PermissionId = 5 ,
5353 Access = 1 ,
54- StartDate = new DateTime ( 2026 , 1 , 15 , 0 , 0 , 0 , DateTimeKind . Local ) ,
54+ StartDate = new DateTime ( 2026 , 1 , 15 , 0 , 0 , 0 , DateTimeKind . Unspecified ) ,
5555 EndDate = null
5656 } ;
5757
@@ -60,7 +60,7 @@ public void MemberPermission_RoundTripsThroughSerialization()
6060 JsonSerializer . Deserialize < MemberPermissionCreateUpdate > ( json , JsonSerializerOptions . Web ) ;
6161
6262 Assert . NotNull ( result ) ;
63- Assert . Equal ( new DateTime ( 2026 , 1 , 15 , 0 , 0 , 0 , DateTimeKind . Local ) , result . StartDate ) ;
63+ Assert . Equal ( new DateTime ( 2026 , 1 , 15 , 0 , 0 , 0 , DateTimeKind . Unspecified ) , result . StartDate ) ;
6464 Assert . Null ( result . EndDate ) ;
6565 }
6666
0 commit comments