use moment to detect timezones
This commit is contained in:
parent
ae8a79ea07
commit
6e514e1ccc
11 changed files with 74 additions and 142 deletions
|
@ -234,6 +234,9 @@ module.exports.insert = (listId, meta, subscription, callback) => {
|
|||
Object.keys(subscription).forEach(key => {
|
||||
let value = subscription[key];
|
||||
key = tools.toDbKey(key);
|
||||
if (key === 'tz') {
|
||||
value = (value || '').toString().toLowerCase().trim();
|
||||
}
|
||||
if (allowedKeys.indexOf(key) >= 0) {
|
||||
keys.push(key);
|
||||
values.push(value);
|
||||
|
@ -443,6 +446,9 @@ module.exports.update = (listId, cid, updates, allowEmail, callback) => {
|
|||
Object.keys(updates).forEach(key => {
|
||||
let value = updates[key];
|
||||
key = tools.toDbKey(key);
|
||||
if (key === 'tz') {
|
||||
value = (value || '').toString().toLowerCase().trim();
|
||||
}
|
||||
if (allowedKeys.indexOf(key) >= 0) {
|
||||
keys.push(key);
|
||||
values.push(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue