Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove class for UTC compat for Python 2 #338

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,7 @@
from m3u8.protocol import ext_x_part, ext_x_preload_hint, ext_x_start


class UTC(datetime.tzinfo):
"""tzinfo class used for backwards compatibility reasons.
Extracted from the official documentation.
Ref: https://docs.python.org/2/library/datetime.html#datetime.tzinfo.fromutc
"""

def utcoffset(self, dt):
return datetime.timedelta(0)

def tzname(self, dt):
return "UTC"

def dst(self, dt):
return datetime.timedelta(0)


utc = UTC()
utc = datetime.timezone.utc


def test_base_path_playlist_with_slash_in_query_string():
Expand Down
Loading