Hi,
On the form I select for example 14-07-2019 in datepicker and the date sent to API is 13-07-2019. Do I need to configure something on the Angular side (timezone, utc ?) ? I am using ASP.ZERO Asp Core + Angular 7 Version 6.9.
Thanks in advance.
4 Answer(s)
-
0
Hi @miroslav.engi
- Could you share the exact string sent to server as the date value ?
- Have you set
Clock.Provider = ClockProviders.Utc
in your app ?
Thanks,
-
0
Hi,
The parameter sent to API is deliveryDate: "2019-08-30T00:00:00.000Z" and the date I selected in datepicker is 2019-08-31.
The clock provider is currently set on the backend.
Clock.Provider = ClockProviders.Utc;
in the Startup.cs of Web.Host project inpublic IServiceProvider ConfigureServices(IServiceCollection services)
method. -
0
Hi @miroslav.engi
Thank you for sharing this information. So, if you select 2019-08-31, the value "2019-08-30T00:00:00.000Z" is sent to server, right ?
I will create an issue on GitHub according to your answer.
Thanks,
-
0
Hi,
I am not sure what was the issue, but I deleted the database, ran migration, cleared browser cache, created tenant and set timezone to Central European and now works fine.
The
Clock.Provider = ClockProviders.Utc;
is set to UTC.