Skip to content

Commit

Permalink
Handle datetime ISO issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tsickert committed Sep 24, 2021
1 parent 05818e6 commit e4a8906
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webhook.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import datetime

import requests
import argparse
import json
Expand Down Expand Up @@ -79,7 +81,8 @@ def construct_payload(args):

timestamp = args[f'embed_{index}timestamp']
if present(timestamp):
embed['timestamp'] = timestamp
date = datetime.datetime.strptime(timestamp, '%m/%d/%Y %H:%M:%S')
embed['timestamp'] = date.isoformat()

color = args[f'embed_{index}color']
if present(color):
Expand Down

0 comments on commit e4a8906

Please sign in to comment.