hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

HLS DateTime parsing ISO8601 differential

Open robwalch opened this issue 9 months ago • 0 comments

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

robwalch avatar May 22 '25 21:05 robwalch