Skip to content

Commit

Permalink
fix: Change displayed time
Browse files Browse the repository at this point in the history
  • Loading branch information
gogumaC committed Oct 30, 2023
1 parent cc2db04 commit d8e49ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ def find_new_posting():
new_postings = []

for index, entry in enumerate(feed['entries']):

published_time = datetime.strptime(entry['published'], "%Y-%m-%dT%H:%M:%S+00:00")


if published_time > one_hour_ago and published_time <= current_time :
title = entry['title']
link = entry['link']
published_time_str = published_time.strftime("%Y.%m.%d %H:%M")
published_time_str = (published_time + timedelta(hours = 9)).strftime("%Y.%m.%d %H:%M")
new_postings.append({ 'title':title,'link':link,'published_time':published_time_str })
print(f'#{ index + 1 } : { title } | { published_time_str } | { link } \n ')

Expand Down

0 comments on commit d8e49ab

Please sign in to comment.