mirror of
https://github.com/iptv-org/epg
synced 2025-12-18 11:27:06 -05:00
Update m.tv.sms.cz.config.js
Fixes wrong timeshift
This commit is contained in:
@@ -3,9 +3,11 @@ const { JSDOM } = jsdom
|
|||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
var customParseFormat = require('dayjs/plugin/customParseFormat')
|
var customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||||
|
var timezone = require('dayjs/plugin/timezone')
|
||||||
|
|
||||||
dayjs.extend(utc)
|
dayjs.extend(utc)
|
||||||
dayjs.extend(customParseFormat)
|
dayjs.extend(customParseFormat)
|
||||||
|
dayjs.extend(timezone)
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
lang: 'cs',
|
lang: 'cs',
|
||||||
@@ -39,12 +41,12 @@ module.exports = {
|
|||||||
.trim()
|
.trim()
|
||||||
|
|
||||||
if (time && title) {
|
if (time && title) {
|
||||||
const start = dayjs
|
const local = dayjs
|
||||||
.utc(time, 'HH.mm')
|
.utc(time, 'HH.mm')
|
||||||
.set('D', date.get('D'))
|
.date(date.date())
|
||||||
.set('M', date.get('M'))
|
.month(date.month())
|
||||||
.set('y', date.get('y'))
|
.year(date.year())
|
||||||
.toString()
|
const start = dayjs.tz(local.toString(), 'Europe/Prague').toString()
|
||||||
|
|
||||||
if (programs.length && !programs[programs.length - 1].stop) {
|
if (programs.length && !programs[programs.length - 1].stop) {
|
||||||
programs[programs.length - 1].stop = start
|
programs[programs.length - 1].stop = start
|
||||||
|
|||||||
Reference in New Issue
Block a user