question

amar avatar image
amar asked Dan answered

How order modified time can be different at same time for same order obtained by two methods?

Hi @Jeffrey Blattman
Order modify time got from orderCoenctor.getOrder(id).getModifiedTime is different from
getContentResolver().query(OrderContract.Summaries.contentUriWithAccount(account), null, null, null, null);
cursor.getLong(cursor.getColumnIndex(OrderContract.Summaries.LAST_MODIFIED) for same order ID.

How this can be possible and will these times be same on all devices for same merchant?
Clover Android SDKClover MiniClover StationClover Mobile
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Dan avatar image
Dan answered
For some reason, the orders ContentProvider is storing the order.getCreatedTime() rather than order.getModifiedTime() in the OrdersContract.Summaries.LAST_MODIFIED column.

The Summaries version will be the same across all devices (but presumably not what you wanted). The OrderConnector version will vary based on local modifications and how recently the devices synced orders, but generally will be the same across devices.

There are improvements to order summaries forthcoming, which include a fix for this, but I can't give an ETA on them.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community