Skip to content

Commit

Permalink
Remove class for UTC compat for Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
daveisfera authored Oct 26, 2023
1 parent c741a8e commit f896723
Showing 1 changed file with 1 addition and 17 deletions.
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

0 comments on commit f896723

Please sign in to comment.