You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know you can set TimeZoneInfo on the ODataQuerySettings, but this appears to only be used in the ExpressionBinderHelper class and not for serialization.
It'd be nice to add the option to configure TimeZoneInfo for serialization like we have when using OData with controllers. Currently the result from an endpoint always comes back with DateTime displayed using the local time of the server.
Controller Service Configuration:
builder.Services.AddControllers().AddOData(opt =>{opt.EnableQueryFeatures();opt.AddRouteComponents("odata",EdmModelHelper.GetEdmModel());opt.TimeZone=TimeZoneInfo.Utc;// Missing from Minimal API Service Configuration});
Minimal API Service Configuration Example:
builder.Services.AddOData(q =>{q.EnableAll();q.SetCaseInsensitive(true);q.SetTimeZoneInfo(TimeZoneInfo.Utc);// Add something like this to be able to set DateTime serialization options.});
The text was updated successfully, but these errors were encountered:
I know you can set TimeZoneInfo on the ODataQuerySettings, but this appears to only be used in the ExpressionBinderHelper class and not for serialization.
It'd be nice to add the option to configure TimeZoneInfo for serialization like we have when using OData with controllers. Currently the result from an endpoint always comes back with DateTime displayed using the local time of the server.
Controller Service Configuration:
Minimal API Service Configuration Example:
The text was updated successfully, but these errors were encountered: