getsentry / raven-csharp

Superseded by: https://github.com/getsentry/sentry-dotnet
BSD 3-Clause "New" or "Revised" License
231 stars 121 forks source link

Send TimeZone information with Contexts data #236

Closed bruno-garcia closed 6 years ago

bruno-garcia commented 6 years ago

As part of the Contexts interface, provide the TimeZone information with each event.

Sentry docs on the Context Interface: https://docs.sentry.io/clientdev/interfaces/contexts/

The most consistent API for this is TimeZoneInfo.Local.Id which has also been around for a while so no need for #ifdef

On CoreCLR, Linux and macOS, it'll return the 'Europe/Vienna' format. On CoreCLR and CLR on Windows, it'll return the 'W. Europe Daylight Time' format.

For Mono and Linux under WSL, see: mono/mono/issues/8267 Microsoft/WSL/issues/3109

bruno-garcia commented 6 years ago

/cc @mitsuhiko

asbjornu commented 6 years ago

dotnet/corefx#11897 seems relevant.

bruno-garcia commented 6 years ago

Implemented through #237