Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: Change default Event timestamp to UtcNow #104

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ The `Unreleased` section name is replaced by the expected version of next releas

### Fixed

- `Core.Codec`: Changed default timestamp to `DateTime.UtcNow` as per docs (was: `DateTime.Now`) [#104](https://github.com/jet/FsCodec/pull/104)

<a name="3.0.0-rc.11"></a>
## [3.0.0-rc.11] - 2023-8-25

Expand Down
2 changes: 1 addition & 1 deletion src/FsCodec.Box/CoreCodec.fs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type Codec private () =
let down context union =
let struct (c, m, t) = down.Invoke union
let struct (m', eventId, correlationId, causationId) = mapCausation.Invoke(context, m)
struct (c, m', eventId, correlationId, causationId, match t with ValueSome t -> t | ValueNone -> DateTimeOffset.Now)
struct (c, m', eventId, correlationId, causationId, match t with ValueSome t -> t | ValueNone -> DateTimeOffset.UtcNow)
Codec.Create(encoder, up = up, down = down, ?rejectNullaryCases = rejectNullaryCases)

/// <summary>Generate an <code>IEventCodec</code> using the supplied <c>encoder</c>.<br/>
Expand Down