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

Handle DateTimeOffset in the same way as DateTime #797

Merged
merged 2 commits into from
Nov 24, 2022
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
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

* Added support for
[DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset).
([#797](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/797))

## 1.4.0-beta.5

Released 2022-Nov-21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ public static int Serialize(byte[] buffer, int cursor, object obj)
return SerializeArray(buffer, cursor, v);
case DateTime v:
return SerializeUtcDateTime(buffer, cursor, v.ToUniversalTime());
case DateTimeOffset v:
utpilla marked this conversation as resolved.
Show resolved Hide resolved
return SerializeUtcDateTime(buffer, cursor, v.UtcDateTime);
default:
string repr = null;

Expand Down