mirror of
https://github.com/moparisthebest/mail
synced 2025-02-17 23:40:22 -05:00
bugfix with filtering by GMT time for server
This commit is contained in:
parent
699871276c
commit
c5b83d4725
@ -142,9 +142,16 @@ define(['underscore', 'cryptoLib/util', 'js/crypto/crypto', 'js/dao/lawnchair-da
|
|||||||
|
|
||||||
var filter = '';
|
var filter = '';
|
||||||
if (localItems && localItems.length > 0) {
|
if (localItems && localItems.length > 0) {
|
||||||
|
// get gmt date since that's what the storage service seems to use
|
||||||
|
var sentDate = localItems[localItems.length - 1].sentDate;
|
||||||
|
var date = util.parseDate(sentDate);
|
||||||
|
date.setHours(date.getHours() + (date.getTimezoneOffset() / 60));
|
||||||
|
var gmtDate = util.formatDate(date);
|
||||||
|
|
||||||
// sync delta of last item sent date
|
// sync delta of last item sent date
|
||||||
//filter = '?date=' + localItems[localItems.length - 1].sentDate;
|
filter = '?date=' + gmtDate;
|
||||||
startSync(filter);
|
startSync(filter);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// do a full sync of all items on the cloud
|
// do a full sync of all items on the cloud
|
||||||
startSync(filter);
|
startSync(filter);
|
||||||
|
Loading…
Reference in New Issue
Block a user