Skip to content

Commit

Permalink
Mark Mongo time serialized to local instance time by default. #1400
Browse files Browse the repository at this point in the history
  • Loading branch information
yang-xiaodong committed Sep 11, 2023
1 parent ff76dea commit c362bfa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/DotNetCore.CAP.MongoDB/StorageMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ internal class ReceivedMessage

public string Content { get; set; } = default!;

[BsonDateTimeOptions(Kind = DateTimeKind.Local)]
public DateTime Added { get; set; }

[BsonDateTimeOptions(Kind = DateTimeKind.Local)]
public DateTime? ExpiresAt { get; set; }

public int Retries { get; set; }
Expand All @@ -39,8 +41,10 @@ internal class PublishedMessage

public string Content { get; set; } = default!;

[BsonDateTimeOptions(Kind = DateTimeKind.Local)]
public DateTime Added { get; set; }

[BsonDateTimeOptions(Kind = DateTimeKind.Local)]
public DateTime? ExpiresAt { get; set; }

public int Retries { get; set; }
Expand All @@ -58,5 +62,6 @@ public class Lock

public string Instance { get; set; } = default!;

[BsonDateTimeOptions(Kind = DateTimeKind.Local)]
public DateTime LastLockTime { get; set; }
}

0 comments on commit c362bfa

Please sign in to comment.