Skip to content

Commit

Permalink
timezone rollout 1 (#23)
Browse files Browse the repository at this point in the history
* timezone rollout 1

* tests

---------

Co-authored-by: Ian Noyes <ian.noyes@iheartmedia_com>
  • Loading branch information
IanNoyes and Ian Noyes authored Sep 12, 2024
1 parent 6222331 commit e5e090e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
59 changes: 30 additions & 29 deletions pypodcastparser/Item.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,35 +61,36 @@

# Map of timezone offsets to timezone abbreviations
offset_map = {
"-1200": "IDLW",
"-1100": "NUT",
"-1000": "HST",
"-0930": "MART",
"-0900": "AKST",
"-0800": "PST",
"-0700": "MST",
"-0600": "CST",
"-0500": "EST",
"-0430": "VET",
"-0400": "AST",
"-0330": "NST",
"-0300": "BRT",
"-0200": "GST",
"-0100": "AZOT",
"-0000": "GMT",
"+0100": "CET",
"+0200": "EET",
"+0300": "MSK",
"+0400": "GST",
"+0500": "PKT",
"+0545": "NPT",
"+0600": "BST",
"+0630": "MMT",
"+0700": "ICT",
"+0800": "AWST",
"+0845": "ACWST",
"+0900": "JST",
"+0930": "ACST",
# "-1200": "IDLW",
# "-1100": "NUT",
# "-1000": "HST",
# "-0930": "MART",
# "-0900": "AKST",
# "-0800": "PST",
# "-0700": "MST",
# "-0600": "CST",
# "-0500": "EST",
# "-0430": "VET",
# "-0400": "AST",
# "-0330": "NST",
# "-0300": "BRT",
# "-0200": "GST",
# "-0100": "AZOT",
# "-0000": "GMT",
# "+0000": "GMT",
# "+0100": "CET",
# "+0200": "EET",
# "+0300": "MSK",
# "+0400": "GST",
# "+0500": "PKT",
# "+0545": "NPT",
# "+0600": "BST",
# "+0630": "MMT",
# "+0700": "ICT",
# "+0800": "AWST",
# "+0845": "ACWST",
# "+0900": "JST",
# "+0930": "ACST",
"+1000": "AEST",
"+1030": "ACST",
"+1100": "AEDT",
Expand Down
5 changes: 3 additions & 2 deletions tests/test_pyPodcastParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,9 @@ def test_episode_meta_data_pub_date(self):
self.podcast.items[5].published_date, "2023-07-06 04:00:00"
) # PDT TO EST

self.assertEqual(self.podcast.items[6].published_date, "2023-12-22 17:00:00")
self.assertEqual(self.podcast.items[7].published_date, "2023-12-21 20:00:00")
# TODO: add these back once timezone offset handling is reintroduced.
# self.assertEqual(self.podcast.items[6].published_date, "2023-12-22 17:00:00")
# self.assertEqual(self.podcast.items[7].published_date, "2023-12-21 20:00:00")

def test_episode_meta_data_external_image_url(self):
self.assertEqual(
Expand Down

0 comments on commit e5e090e

Please sign in to comment.