diff --git a/.dockerignore b/.dockerignore index aaa5f610a..afe81bb0f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ node_modules +print/node_modules front/node_modules services \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9f203033a..c7565db0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM debian:stretch-slim +ENV TZ Europe/Madrid ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ diff --git a/front/core/components/calendar/index.js b/front/core/components/calendar/index.js index de03a70c9..fbc3932cf 100644 --- a/front/core/components/calendar/index.js +++ b/front/core/components/calendar/index.js @@ -93,7 +93,7 @@ export default class Calendar extends Component { } applyOffset(date) { - // date.setTime(date.getTime() - date.getTimezoneOffset() * 60000); + date.setTime(date.getTime() - date.getTimezoneOffset() * 60000); } repaint() { @@ -139,12 +139,6 @@ export default class Calendar extends Component { return event.date >= newDate && event.date <= newDate; }); - /* if (curDate >= newDate && curDate <= newDate) - color = 'orange'; */ - - /* if (newDate.getMonth() === this.currentMonth.getMonth() && newDate.getDay() == 6) - color = 'light-blue'; */ - if (newDate.getMonth() === this.currentMonth.getMonth() && newDate.getDay() == 0) color = 'red'; diff --git a/loopback/server/connectors/vn-mysql.js b/loopback/server/connectors/vn-mysql.js index efe859a06..3df0878c9 100644 --- a/loopback/server/connectors/vn-mysql.js +++ b/loopback/server/connectors/vn-mysql.js @@ -24,18 +24,6 @@ class VnMySQL extends MySQL { } } - fromColumnValue(prop, val) { - if (val == null || !prop || prop.type !== Date) - return MySQL.prototype.fromColumnValue.call(this, prop, val); - - let date = new Date(val); - let locale = new Date(val); - let offset = locale.getTimezoneOffset() * 60000; - date.setTime(date.getTime() + offset); - - return date; - } - /** * Promisified version of execute(). * @@ -46,16 +34,6 @@ class VnMySQL extends MySQL { * @return {Promise} The operation promise */ executeP(query, params, options = {}, cb) { - if (params) { - for (let param of params) { - if (param && typeof param.getMonth === 'function') { - let locale = new Date(param); - let offset = locale.getTimezoneOffset() * 60000; - param.setTime(param.getTime() - offset); - } - } - } - return new Promise((resolve, reject) => { this.execute(query, params, options, (error, response) => { if (cb) diff --git a/modules/agency/front/calendar/index.js b/modules/agency/front/calendar/index.js index 64dd5ef84..133d6cdf3 100644 --- a/modules/agency/front/calendar/index.js +++ b/modules/agency/front/calendar/index.js @@ -116,10 +116,7 @@ class Controller { if (event && !event.isRemovable) return false; - // FIXME - Date offset - let date = new Date(day.date); - date.setHours(0, 0, 0, 0); - dates.push(date); + dates.push(day.date); this.stMonth.removeEvent(day.date); this.stMonth.repaint();