Add ability to select date for test run.

Adds ability to select date for test run to process. Adds direct link to
test that failed to be processed by testrail. Changes created_by from
username to user_id

Related-PROD: PRODX-6452
Change-Id: Ib721dba49bf5c6c8d570e3e676eb4eb072604c67
diff --git a/testrail_bot/control/views.py b/testrail_bot/control/views.py
index 1e8eaa3..f813f86 100644
--- a/testrail_bot/control/views.py
+++ b/testrail_bot/control/views.py
@@ -1,4 +1,4 @@
-from datetime import datetime
+import datetime
 import json
 import os
 
@@ -63,17 +63,23 @@
 def submit_run(request, run_id):
     run = models.TestRun.objects.get(pk=run_id)
     report_name = "{}-{}".format(
-        run.run_name, datetime.isoformat(datetime.now()))
+        run.run_name, datetime.datetime.isoformat(datetime.datetime.now()))
     path = os.path.join(models.fs.location, report_name)
     with open(path, "w"):
         pass
+    form = forms.TestRunForm(request.POST)
+    run_date = None
+    if form.is_valid():
+        run_date = datetime.datetime.combine(
+            form.cleaned_data["timestamp"] + datetime.timedelta(days=1),
+            datetime.datetime.min.time()).timestamp()
 
     report = models.Report(
         test_run=run,
         report_name=report_name,
         path=path)
     report.save()
-    process_run.delay(run_id, report.id, path)
+    process_run.delay(run_id, report.id, path, run_date)
 
     return redirect("single_report", report.id)