mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update m.tv.sms.cz.config.js
Fixes wrong timeshift
This commit is contained in:
parent
bf7295dc52
commit
f1b90a8cff
1 changed files with 7 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue