Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 committed Dec 9, 2018
1 parent afb7b41 commit 88f94fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bot.py
Expand Up @@ -2,7 +2,7 @@
from collections import namedtuple
from datetime import datetime

import dateutil.parser
from dateutil import parser
import praw
import requests
from praw.models import Comment
Expand Down Expand Up @@ -43,7 +43,7 @@ def update_format(update):

# Format a datetime to english
def date_datetime(dt):
return dt.strftime("%d %b %Y %H:%M %Z").strip()
return dt.strftime("%d %b %Y %H:%M UTC%z").strip()


# Format a unix timestamp to english
Expand All @@ -53,7 +53,7 @@ def date_unix(unix):

# Format a ISO 8601 date to english
def date_iso(iso):
return date_datetime(dateutil.parser.parse(iso))
return date_datetime(parser.parse(iso))


# Handle an updated incident
Expand Down Expand Up @@ -204,7 +204,7 @@ def incident_check():
# Is a new incident?
if incident["id"] not in known_incidents and not incident["resolved_at"]:
new_incident(incident)
break
continue

# Is an updated incident?
if incident["id"] in known_incidents and incident["updated_at"] != known_incidents[incident["id"]]:
Expand Down

0 comments on commit 88f94fa

Please sign in to comment.