ISO UTC DateTime format as default json output format in MVC 6 API response

And I just stumbled onto something that helped me figure it out.

Just in case anyone wants to know

In your Startup.ConfigureServices

services.AddMvc().AddJsonOptions(options =>
                {
                    options.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Utc;
                });

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)