i have some trouble properly using date with angular5
i fetch data from a mocked api where date is generated like that : 24/07/2018 00:00:00 so there is no problem with resarch or anything manipulating those dates.
sample of the generation in api mock :
for (int i = 1; i <= NUMBER_OF_POLICIES; i++)
{
Policy lPolicy = new Policy { Id = i, Name = string.Concat("Policy number ", i), Date = DateTime.Now.AddDays(i) };
p.Add(lPolicy);
}
problem comes when i update dates with angular material DatePicker component.
with the picker, date shows up like tis :
Mon Jul 30 2018 00:00:00 GMT+0200
so when i update the item, date is passed like this :
updated item: {"id":1,"name":"Policy number 1","date":"2018-07-29T22:00:00.000Z"}
any idea how to deal with locales ?
EDIT :
Here is the problem when i do some research :
