Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Item.getDateTimeLastModified() returns wrong date #86

@anihojnadel

Description

@anihojnadel

Adding issue from Gary Bentley in: Stack Overflow


I'm finding that a call to Item.getDateTimeLastModified() will consistently return an incorrect date/time. Most of the time, if an item has been recently updated, it will return a millisecond value (in the GMT time zone) that is anything up to 2 hours and a few minutes ahead of current GMT.

Other date times such as Event.getStart()/Event.getEnd() are returning the correct values.

When processing calendar events I am using the following to retrieve events:


ListenableFuture<List<Event>> eventsGet = this.userFetcher
                .getCalendar (this.calendarId)
                .getEvents ()
                .top (pageSize)
                .skip (skip)
                .select ("Id")
                .filter (modFromDate)
                .orderBy ("DateTimeLastModified")
                .read ();

List<Event> events = eventsGet.get (60,
                                TimeUnit.SECONDS);

Then I process the events one at a time and using the id get the actual event using:

this.userFetcher.getCalendar (this.calendarId).getEvent (id).read ().get (60, TimeUnit.SECONDS);

Calling getDateTimeLastModified on that event will return the strange value.

As an aside, I notice that the Office.com calendar when it retrieves the json data for the event has the correct last modified time.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions