aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-02-29 03:01:41 +0100
committerPaul Oliver <contact@pauloliver.dev>2024-02-29 03:01:41 +0100
commitbc9739d4d3e51dc1eee369d20271fb2b693115a4 (patch)
tree2f9c4cb292fa91aa1643d4eb9ef93193771f720b /server
parente298a263223d9b08f9d566c2038b0689506e967d (diff)
Added READMEHEADmaster
Diffstat (limited to 'server')
-rw-r--r--server/server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/server.py b/server/server.py
index f1ddaa9..ca28d51 100644
--- a/server/server.py
+++ b/server/server.py
@@ -1,3 +1,5 @@
+import time
+
from datetime import datetime
from flask import abort, Flask, jsonify
from flask_cors import CORS
@@ -11,12 +13,15 @@ CORS(app)
@app.route('/zones/', methods=['GET'])
def zones():
""" Return a list of common timezones """
+ # time.sleep(5) # Simulate slow connection
return jsonify(common_timezones)
@app.route('/time-at/<path:zone>', methods=['GET'])
def time_at(zone):
""" Return current time at given timezone """
+ # time.sleep(5) # Simulate slow connection
+
if zone not in common_timezones:
abort(404)