diff --git a/build/templates/init.html b/build/templates/init.html index 3944df9..bc177e1 100644 --- a/build/templates/init.html +++ b/build/templates/init.html @@ -1,18 +1,18 @@
diff --git a/build/year-progress.py b/build/year-progress.py index 06648fb..809dcec 100644 --- a/build/year-progress.py +++ b/build/year-progress.py @@ -175,7 +175,8 @@ def getHomoSapiens(yearPercent): return f"Homo Sapiens have been around for ~{-math.floor(yearsUntilHumans)} years" def getTemplate(timestamp): - now = datetime.datetime.fromtimestamp(timestamp) + # Tue, 22 Nov 2011 06:00:00 GMT + now = datetime.datetime.strptime(timestamp,"%a, %d %b %Y %H:%M:%S %Z") nowTime = now.strftime("%-I:%M%p") nowDate = now.strftime("%A") + " " + now.strftime("%-d") + " " + now.strftime("%B") @@ -215,7 +216,7 @@ def index(timestamp): @app.route("/", methods=["GET","POST"]) def init(): if request.method == "POST": - timestamp = int(request.values.get('timestamp')) + timestamp = request.values.get('date') return index(timestamp) else: return render_template("init.html")