VyLala commited on
Commit
be0ff96
·
verified ·
1 Parent(s): ba972a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -292,12 +292,13 @@ with gr.Blocks() as interface:
292
  # )
293
 
294
  def log_submission_to_gsheet(email, samples):
295
- from datetime import datetime
296
  import json, os, gspread
297
  from oauth2client.service_account import ServiceAccountCredentials
298
  import uuid
299
 
300
- timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
 
301
  if not email.strip():
302
  email = f"anonymous_{str(uuid.uuid4())[:8]}"
303
 
@@ -314,7 +315,7 @@ with gr.Blocks() as interface:
314
  headers = data[0]
315
  email_col = headers.index("email")
316
  samples_col = headers.index("samples")
317
- recent_time_col = headers.index("recent_time")
318
 
319
  # Find the row to update
320
  for i, row in enumerate(data[1:], start=2): # start=2 because header is row 1
 
292
  # )
293
 
294
  def log_submission_to_gsheet(email, samples):
295
+ from datetime import datetime, timezone
296
  import json, os, gspread
297
  from oauth2client.service_account import ServiceAccountCredentials
298
  import uuid
299
 
300
+ timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S UTC")
301
+
302
  if not email.strip():
303
  email = f"anonymous_{str(uuid.uuid4())[:8]}"
304
 
 
315
  headers = data[0]
316
  email_col = headers.index("email")
317
  samples_col = headers.index("samples")
318
+ recent_time_col = headers.index("recent_time(UTC)")
319
 
320
  # Find the row to update
321
  for i, row in enumerate(data[1:], start=2): # start=2 because header is row 1