Converting MS SQL Date to JavaScript full datetime adds 3 hours

Viewed 3476

I have date type column in MS SQL table, which I need to convert to full date and time in JavaScript. Here is my code:

            $.ajax({
                type: "POST",
                url: "http://localhost:8080/dates",
                data: {},
                dataType: "JSON",
                success: function(data) {
                    holidays = new Array();
                    for (var i of data[0])
                    {
                        date = new Date(i.holiday_date);
                        console.log(date);
                        holidays.push(date);
                    }
                }
            });

The result is:

Mon May 01 2017 03:00:00 GMT+0300 (FLE Summer Time)

Tue May 02 2017 03:00:00 GMT+0300 (FLE Summer Time)

My question is why it is adding three hours?

2 Answers
Related