I'm trying to get some information from an event from a SharePoint Online list (ex. events start date 25 june 00.00). When I get the results back in a array with JavaScript it returns 25 june 02.00 UTC +0200. How can I get the actual results from the event?

It doesn't say 02.00, just 00.00.

If I remove 2 hours in the code it will cause trouble with day light saving?

   var listItemEnumerator = this._calendar.items.getEnumerator();
        var calendarList = [];
        while (listItemEnumerator.moveNext()) {
            var listItem = listItemEnumerator.get_current();
                startDate: listItem.get_item("EventDate"),
                endDate: listItem.get_item("EndDate")
        this._calendar = calendarList;

With this date I'm getting from the calendar I'm comparing with the users current date, but it doesn't matter when the event should for example end on the 22 june 23.59, then the JavaScript add 2 hours, so it shows the end date the 23rd which is wrong.

  • Could you post what the actual value and format returned is?
    – filoxo
    May 27, 2014 at 16:30

1 Answer 1


I got the correct result from the event in SharePoint with .toISOString() on startDate, and then I could use that value with the users current date to get what I wanted.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.