mrellipse / toucan

Boilerplate template using Vue.js, TypeScript and .NET Core 2.1, based on SOLID design principles
MIT License
212 stars 36 forks source link

TimeZone Serialization Issue #26

Closed mrellipse closed 6 years ago

mrellipse commented 6 years ago

The custom MVC input/output formatters are incorrectly implemented.

They modify a shared/global version of Json SerializerSettings (through a class instance). This is not a thread-safe approach. Also, it is appending rather then upserting the DateTime converter.

So a side-effect of this is that the very first converter instance added to Serializer Settings is determined by localization cookie of the first user to hit the website after bootstrapping.

mrellipse commented 6 years ago

fixed the issue by creating customer serializer settings, and writing output directly to HttpResponse screen.

also simplified date/time conversion helpers

behaviour is now consistent

mrellipse commented 6 years ago

merged