hls.js
hls.js copied to clipboard
HLS DateTime parsing ISO8601 differential
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
- validating whether date times have a timezone (or UTC "Z") and warn when one does not
- adding the UTC timezone (letter Z) when missing before parsing