diff options
| author | Zog | 2018-01-25 05:21:17 -0800 |
|---|---|---|
| committer | Zog | 2018-01-25 05:21:17 -0800 |
| commit | 257f1bf2b02001605f8b7ec7e6fd894efad79f47 (patch) | |
| tree | 71814055b776e098e0734263e37f6be36b70224e /app | |
| parent | 5ecadfdead964381304fcf56a2564e2045988ef7 (diff) | |
| download | chouette-core-257f1bf2b02001605f8b7ec7e6fd894efad79f47.tar.bz2 | |
Refs #5717; Fix TZ related issues
Diffstat (limited to 'app')
| -rw-r--r-- | app/javascript/time_tables/actions/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/javascript/time_tables/actions/index.js b/app/javascript/time_tables/actions/index.js index 13cb96b64..787cee439 100644 --- a/app/javascript/time_tables/actions/index.js +++ b/app/javascript/time_tables/actions/index.js @@ -156,8 +156,9 @@ const actions = { }), monthName(strDate) { let monthList = range(1,13).map(n => I18n.calendars.months[n]) + console.log("strDate: "+strDate) let date = new Date(strDate) - return monthList[date.getMonth()] + return monthList[date.getUTCMonth()] }, getHumanDate(strDate, mLimit) { let origin = strDate.split('-') @@ -173,7 +174,7 @@ const actions = { }, getLocaleDate(strDate) { let date = new Date(strDate) - return date.toLocaleDateString() + return date.toLocaleDateString(undefined, { timeZone: 'UTC' }) }, updateSynthesis: ({current_month, time_table_dates: dates, time_table_periods: periods}) => { let newPeriods = reject(periods, 'deleted') @@ -194,7 +195,7 @@ const actions = { for (let period of periods) { let begin = new Date(period.period_start) - let end = new Date(period.period_end) + let end = new Date(period.period_end) if (date >= begin && date <= end) return true } @@ -325,4 +326,4 @@ const actions = { } } -export default actions
\ No newline at end of file +export default actions |
