Skip to content

Commit

Permalink
invalid start dates include seconds (#16)
Browse files Browse the repository at this point in the history
* invalid start dates include seconds

* 3.9.1 version number

* unit tests

---------

Co-authored-by: Ian Noyes <ian.noyes@iheartmedia_com>
  • Loading branch information
IanNoyes and Ian Noyes authored Nov 15, 2023
1 parent 6fe57b3 commit fbc8ce6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pypodcastparser/Item.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def set_published_date(self, tag):
except Exception:
self.published_date = datetime.datetime.now(
pytz.timezone("US/Eastern")
).strftime("%Y-%m-%d %H:%M")
).strftime("%Y-%m-%d %H:%M:%S")

def set_title(self, tag):
"""Parses title and set value."""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
setup(
name='pypodcastparser-ihr',

version='1.9.0',
version='1.9.1',

description='pypodcastparser is a podcast parser.',
long_description=long_description,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pyPodcastParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def test_episode_meta_data_pub_date(self):
self.assertEqual(self.podcast.items[2].published_date, "2022-05-30 00:05:03")

current_time = datetime.datetime.now(pytz.timezone("US/Eastern")).strftime(
"%Y-%m-%d %H:%M"
"%Y-%m-%d %H:%M:%S"
)
self.assertEqual(self.podcast.items[3].published_date, current_time)
self.assertEqual(self.podcast.items[4].published_date, "2023-05-22 00:00:00")
Expand Down

0 comments on commit fbc8ce6

Please sign in to comment.