Verify icon indicating copy to clipboard operation
Verify copied to clipboard

Group different datetimeoffsets

Open SebastianStehle opened this issue 3 years ago • 0 comments

Is the feature request related to a problem

I have code in my API that looks basically like this

var entity = new Entity { Created = DateTime.UtcNow };
await DoX();
await DoY();
entity.LastUpdated = DateTime.UtcNow;

it is a little bit more complicated, but in general the problem is that Created is sometimes not the same as LastUpdated.

Therefore I sometimes get the following output

{
  created: DateTimeOffset_1,
  lastUpdate: DateTimeOffset_2,
}

And sometimes

{
  created: DateTimeOffset_1,
  lastUpdate: DateTimeOffset_1,
}

Describe the solution

"Group" DateTimeOffset values that are close to each other, defined by a delta value.

Describe alternatives considered

The only alternative I see is to disable DateTimeOffset members.

SebastianStehle avatar Aug 01 '22 12:08 SebastianStehle