Hi I have an issue where my OData response is correct with the below data but my grid displays a day prior to all dates.
<SfGrid TValue="PurchaseOrder" Query="@(new Query().Where("OrderNumber", "equal", SelectedPurchaseOrderSummary.OrderNumber))" AllowFiltering="true" AllowPaging="true">
<SfDataManager Url="odata/PurchaseOrders" Adaptor="Adaptors.ODataV4Adaptor" CrossDomain="true"></SfDataManager>
<GridFilterSettings Mode="FilterBarMode.Immediate" ImmediateModeDelay="300"></GridFilterSettings>
<GridColumns>
<GridColumn Field=@nameof(PurchaseOrder.Model) HeaderText="Model"></GridColumn>
<GridColumn Field=@nameof(PurchaseOrder.AlternateModel) HeaderText="Your Model"></GridColumn>
<GridColumn Field=@nameof(PurchaseOrder.Price) HeaderText="Price" Format="c2"></GridColumn>
<GridColumn Field=@nameof(PurchaseOrder.QuantityOrdered) HeaderText="Quantity" Type="ColumnType.Number" Width="100"></GridColumn>
<GridColumn Field="@nameof(PurchaseOrder.QuantityShipped)" HeaderText="Shipped" Type="ColumnType.Number" Width="100"></GridColumn>
<GridColumn Field="@nameof(PurchaseOrder.ETA)" HeaderText="EST. Ship Date" Format="d" Type="ColumnType.Date"></GridColumn>
<GridColumn Field="@nameof(PurchaseOrder.RevisedETA)" HeaderText="Revised EST. Ship Date" Format="d" Type="ColumnType.Date">
</GridColumn>
</GridColumns>
Thank you upon testing your sample and my sample locally I do not find the issue, the correct dates are shown.
When I publish to Azure App Service, I get the issue where the dates are off by 1 day. Showing the previous day in the grid.
I am able to reproduce this issue by publishing your sample to Azure. Syncfusion (caltestelectronics3.azurewebsites.net)
But I have confirmed with your sample and my sample that the OData is sending the correct date in the response.
Maybe this is more of an Azure issue, but I am hoping you can help me on this.
Hello, I have figured out the issue to be the timezone of my Azure testing environment. I did not know Azure was UTC be default and not my local PST timezone.
Following this blog, I now get the correct Dates after converting UTC to the localtime using the local offset.
Convert DateTime to user's time zone with server-side Blazor - Meziantou's blog