Skip to content

Commit

Permalink
Set the time zone in ODataQuerySettings from the request context
Browse files Browse the repository at this point in the history
Fixes OData#384
  • Loading branch information
icnocop committed Feb 1, 2025
1 parent 5b87e2b commit f980553
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

using System.Linq;
using Microsoft.AspNetCore.OData.Abstracts;
using Microsoft.AspNetCore.OData.Extensions;
using Microsoft.AspNetCore.OData.Query.Expressions;
using Microsoft.AspNetCore.OData.Query.Validator;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -25,6 +26,8 @@ public static ODataQuerySettings GetODataQuerySettings(this ODataQueryContext co
returnSettings.CopyFrom(settings);
}

returnSettings.TimeZone = context.Request.GetTimeZoneInfo();

return returnSettings;
}

Expand Down

0 comments on commit f980553

Please sign in to comment.