Azure / Azure/azure-functions-host

Cosmos DB items with datetime as string that has time zone offset loses time zone

Open
#7,114 2 comments 0 reactions 1 assignee Claimed by @brettsam View on GitHub
breaking-change enhancement needs-discussion
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Due to this well-known bug in Json.NET: https://github.com/JamesNK/Newtonsoft.Json/issues/525

To get around this bad default, the C# users can override the settings here: https://github.com/Azure/azure-webjobs-sdk-extensions/pull/575

Unfortunately, this is **not** a viable option for non-.NET languages. We need to introduce some sort of way for time zones to be preserved and set:
```csharp
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
DateParseHandling = DateParseHandling.None
};
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.