mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 18:37:01 -05:00
Singtel.com timezone
Times from data source are local (UTC+8) Added timezone to convert to UTC
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const timezone = require('dayjs/plugin/timezone')
|
||||
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
|
||||
module.exports = {
|
||||
site: 'singtel.com',
|
||||
days: 2,
|
||||
days: 3,
|
||||
request: {
|
||||
cache: {
|
||||
ttl: 60 * 60 * 1000 // 1 hour
|
||||
@@ -18,7 +20,7 @@ module.exports = {
|
||||
let programs = []
|
||||
const items = parseItems(content, channel)
|
||||
items.forEach(item => {
|
||||
const start = dayjs.utc(item.startDateTime)
|
||||
const start = dayjs.tz(item.startDateTime,'Asia/Singapore')
|
||||
const stop = start.add(item.duration, 's')
|
||||
programs.push({
|
||||
title: item.program.title,
|
||||
|
||||
Reference in New Issue
Block a user