Skip to content

Commit

Permalink
FIX THE PUBLISH DATE OMG HOW DID I FUCK THAT UP AND LEAVE IT FUCKED U…
Browse files Browse the repository at this point in the history
…P FOR LIKE A WHOLE YEAR OMG OMG WTF WTF
  • Loading branch information
SamuelmdLow committed Sep 12, 2024
1 parent caf0f2d commit 7f3394c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions article/templatetags/articletags.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ def display_pubdate(value):
if value == None:
return "Unknown"

pubdate = value
today = timezone.now()
pubdate = value.astimezone(timezone.get_current_timezone())
today = timezone.now().astimezone(timezone.get_current_timezone())
delta = today - pubdate
print(today.date())
print(pubdate.date())

if delta.total_seconds() > datetime.timedelta(days=365).total_seconds():
return pubdate.strftime("%B xx%d, %Y").replace("xx0","").replace("xx","")
Expand Down

0 comments on commit 7f3394c

Please sign in to comment.