video-dev / video-dev/hls.js

HLS DateTime parsing ISO8601 differential

Open
#7,268 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Stream Issue
Dominant language
TypeScript
Stars
16.9k
Forks
2.8k
Avg merge
1d 12h
Merged PRs (30d)
27

Description

The HLS spec for #EXT-X-PROGRAM-DATE-TIME was updated (draft-pantos-hls-rfc8216bis-17 ) to say

If no time zone is indicated, the client SHOULD treat the
time zone as UTC.

While not stated, START-DATE and END-DATE Date Range attributes are parsed the same way by Apple platform embedded HLS clients.

This isn't free when using JS Date(.parse) which always parses dates according to ISO8601 which would consider dates without a time zone to use local time.

We should consider

  1. validating whether date times have a timezone (or UTC "Z") and warn when one does not
  2. adding the UTC timezone (letter Z) when missing before parsing

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing parsing for HLS EXT-X-PROGRAM-DATE-TIME and START-DATE/END-DATE values, then verify how timezone-less strings reach JavaScript Date.parse. Done means the chosen handling matches the stated HLS behavior, including the requested validation or UTC treatment, with coverage for timezone-present and timezone-missing values.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
audio-video-rtc
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.