fix(prestashop): import dates in the shop time zone (1.1.15)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { Config } = require('@orbito/api-lib');
|
||||
const { DEFAULT_SHOP_TIME_ZONE } = require('./prestashop-date');
|
||||
|
||||
/** Stały identyfikator sklepu (jeden sklep na firmę) — używany w PsOrder.shopConfigId. */
|
||||
const SHOP_ID = 'default';
|
||||
@@ -36,6 +37,7 @@ async function loadConfig() {
|
||||
shopName,
|
||||
shopPrefix,
|
||||
versionCode,
|
||||
timeZone,
|
||||
orderStatus,
|
||||
lastOrderId,
|
||||
psStates
|
||||
@@ -45,6 +47,7 @@ async function loadConfig() {
|
||||
Config.get('connection.shopName', ''),
|
||||
Config.get('connection.shopPrefix', ''),
|
||||
Config.get('connection.versionCode', ''),
|
||||
Config.get('connection.timeZone', DEFAULT_SHOP_TIME_ZONE),
|
||||
Config.get('import.orderStatus', ''),
|
||||
Config.get('runtime.lastOrderId', null),
|
||||
loadPsStates()
|
||||
@@ -59,6 +62,7 @@ async function loadConfig() {
|
||||
shopName: shopName || '',
|
||||
shopPrefix: shopPrefix || '',
|
||||
versionCode: versionCode || '',
|
||||
timeZone: String(timeZone || DEFAULT_SHOP_TIME_ZONE).trim() || DEFAULT_SHOP_TIME_ZONE,
|
||||
orderStatus: orderStatus || '',
|
||||
lastOrderId: lastOrderId == null ? null : Number(lastOrderId),
|
||||
psStates,
|
||||
|
||||
Reference in New Issue
Block a user