Spaces:
Paused
Paused
Update code generation
Browse files
app.py
CHANGED
@@ -110,7 +110,7 @@ def get_today_utc():
|
|
110 |
|
111 |
|
112 |
def get_code(username: str):
|
113 |
-
today = get_today_utc()
|
114 |
date_string = today.strftime("%Y-%m-%d")
|
115 |
alphabet = string.ascii_letters + string.digits
|
116 |
data = f"{secret_key}||{username}||{date_string}||{secret_key}"
|
|
|
110 |
|
111 |
|
112 |
def get_code(username: str):
|
113 |
+
today = get_today_utc() - timedelta(hours=8) # offset for UTC 8:00 starting time
|
114 |
date_string = today.strftime("%Y-%m-%d")
|
115 |
alphabet = string.ascii_letters + string.digits
|
116 |
data = f"{secret_key}||{username}||{date_string}||{secret_key}"
|