@@ -18,6 +18,8 @@ namespace JsonApiDotNetCoreTests.IntegrationTests.Serialization
18
18
{
19
19
public sealed class SerializationTests : IClassFixture < IntegrationTestContext < TestableStartup < SerializationDbContext > , SerializationDbContext > >
20
20
{
21
+ private const string JsonDateTimeOffsetFormatSpecifier = "yyyy-MM-ddTHH:mm:ss.FFFFFFFK" ;
22
+
21
23
private readonly IntegrationTestContext < TestableStartup < SerializationDbContext > , SerializationDbContext > _testContext ;
22
24
private readonly SerializationFakers _fakers = new ( ) ;
23
25
@@ -110,7 +112,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
110
112
""id"": """ + meetings [ 0 ] . StringId + @""",
111
113
""attributes"": {
112
114
""title"": """ + meetings [ 0 ] . Title + @""",
113
- ""startTime"": """ + meetings [ 0 ] . StartTime . ToString ( "O" ) + @""",
115
+ ""startTime"": """ + meetings [ 0 ] . StartTime . ToString ( JsonDateTimeOffsetFormatSpecifier ) + @""",
114
116
""duration"": """ + meetings [ 0 ] . Duration + @""",
115
117
""location"": {
116
118
""lat"": " + meetings [ 0 ] . Location . Latitude . ToString ( CultureInfo . InvariantCulture ) + @",
@@ -191,7 +193,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
191
193
""id"": """ + meetings [ 0 ] . StringId + @""",
192
194
""attributes"": {
193
195
""title"": """ + meetings [ 0 ] . Title + @""",
194
- ""startTime"": """ + meetings [ 0 ] . StartTime . ToString ( "O" ) + @""",
196
+ ""startTime"": """ + meetings [ 0 ] . StartTime . ToString ( JsonDateTimeOffsetFormatSpecifier ) + @""",
195
197
""duration"": """ + meetings [ 0 ] . Duration + @""",
196
198
""location"": {
197
199
""lat"": " + meetings [ 0 ] . Location . Latitude . ToString ( CultureInfo . InvariantCulture ) + @",
@@ -245,7 +247,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
245
247
""id"": """ + meeting . StringId + @""",
246
248
""attributes"": {
247
249
""title"": """ + meeting . Title + @""",
248
- ""startTime"": """ + meeting . StartTime . ToString ( "O" ) + @""",
250
+ ""startTime"": """ + meeting . StartTime . ToString ( JsonDateTimeOffsetFormatSpecifier ) + @""",
249
251
""duration"": """ + meeting . Duration + @""",
250
252
""location"": {
251
253
""lat"": " + meeting . Location . Latitude . ToString ( CultureInfo . InvariantCulture ) + @",
@@ -328,7 +330,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
328
330
""id"": """ + attendee . Meeting . StringId + @""",
329
331
""attributes"": {
330
332
""title"": """ + attendee . Meeting . Title + @""",
331
- ""startTime"": """ + attendee . Meeting . StartTime . ToString ( "O" ) + @""",
333
+ ""startTime"": """ + attendee . Meeting . StartTime . ToString ( JsonDateTimeOffsetFormatSpecifier ) + @""",
332
334
""duration"": """ + attendee . Meeting . Duration + @""",
333
335
""location"": {
334
336
""lat"": " + attendee . Meeting . Location . Latitude . ToString ( CultureInfo . InvariantCulture ) + @",
@@ -575,7 +577,7 @@ public async Task Can_create_resource_with_side_effects()
575
577
""id"": """ + newMeeting . StringId + @""",
576
578
""attributes"": {
577
579
""title"": """ + newMeeting . Title + @""",
578
- ""startTime"": """ + newMeeting . StartTime . ToString ( "O" ) + @""",
580
+ ""startTime"": """ + newMeeting . StartTime . ToString ( JsonDateTimeOffsetFormatSpecifier ) + @""",
579
581
""duration"": """ + newMeeting . Duration + @""",
580
582
""location"": {
581
583
""lat"": " + newMeeting . Location . Latitude . ToString ( CultureInfo . InvariantCulture ) + @",
0 commit comments