From adb3af4940de8acb0ddccab2a45dd6f9e7977b7d Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 14 Nov 2022 13:36:24 +0300 Subject: [PATCH] Fixes time zone issue #1332 --- sites/dstv.com/dstv.com.config.js | 10 +--------- sites/dstv.com/dstv.com.test.js | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sites/dstv.com/dstv.com.config.js b/sites/dstv.com/dstv.com.config.js index bf4910c4..ca9049b8 100644 --- a/sites/dstv.com/dstv.com.config.js +++ b/sites/dstv.com/dstv.com.config.js @@ -79,16 +79,8 @@ async function loadProgramDetails(item) { .catch(console.error) } -// function parseStart(item) { -// return dayjs.utc(item.StartTime, 'YYYY-MM-DDTHH:mm:ss') -// } - -// function parseStop(item) { -// return dayjs.utc(item.EndTime, 'YYYY-MM-DDTHH:mm:ss') -// } - function parseTime(time) { - return dayjs.tz(time, 'YYYY-MM-DDTHH:mm:ss', 'Africa/Johannesburg') + return dayjs.utc(time, 'YYYY-MM-DDTHH:mm:ss') } function parseItems(content, channel) { diff --git a/sites/dstv.com/dstv.com.test.js b/sites/dstv.com/dstv.com.test.js index f5be1006..287ba00e 100644 --- a/sites/dstv.com/dstv.com.test.js +++ b/sites/dstv.com/dstv.com.test.js @@ -63,8 +63,8 @@ it('can parse response', done => { expect(result).toMatchObject([ { - start: '2022-03-10T22:10:00.000Z', - stop: '2022-03-10T22:50:00.000Z', + start: '2022-03-11T00:10:00.000Z', + stop: '2022-03-11T00:50:00.000Z', title: 'Curb Your Enthusiasm' // description: // "'S11/E6 of 10 - Man Fights Tiny Woman'. A general entertainment channel showcasing the best international content, focusing on scripted drama, comedy and talk.",