Currently on my system I use the following code, to convert the dates coming into ajax.
new Date(parseInt(data.replace(/\/Date\((-?\d+)\)\//, '$1')))
Since the variable data
is a string that comes in '/Date(1508551200000)/'
format, so you can substitute the variable for that string to test.
Now my problem began to appear on this date, because when I convert it with the above code it gives the following result:
Fri Oct 20 2017 23:00:00 GMT-0300 (Brazil's official time)
But the actual value is 10/21/2017 , when doing a search it turns out that this date was the start of daylight saving time of 2017 and with that it decreased by 1hr, the dates in daylight saving time are having this same problem.
How can I do this conversion so that it ignores this and returns me the value I want, without decreasing by 1hr, in case ignoring this DST conversion.