chandra7799 commited on
Commit
3847a1d
·
verified ·
1 Parent(s): 57b48e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -165,8 +165,10 @@ def process_image(image, project_name):
165
  completed_work = "\n".join([f"{idx+1}. {task}" for idx, task in enumerate(completion_details[milestone]["completed"])])
166
  not_completed_work = "\n".join([f"{idx+1}. {task}" for idx, task in enumerate(completion_details[milestone]["not_completed"])])
167
 
168
- # Adjust the current time to local timezone
169
- local_time = datetime.now(local_timezone).strftime("%Y-%m-dT%H:%M:%S%z") # Corrected ISO 8601 format with timezone
 
 
170
 
171
  # Create the Salesforce record with the image URL and AI prediction
172
  record = {
 
165
  completed_work = "\n".join([f"{idx+1}. {task}" for idx, task in enumerate(completion_details[milestone]["completed"])])
166
  not_completed_work = "\n".join([f"{idx+1}. {task}" for idx, task in enumerate(completion_details[milestone]["not_completed"])])
167
 
168
+ # Adjust the current time to local timezone with proper ISO 8601 format
169
+ now = datetime.now(local_timezone)
170
+ # Format the datetime with a colon in the timezone offset (e.g., +05:30)
171
+ local_time = now.strftime("%Y-%m-%dT%H:%M:%S") + now.strftime("%z").insert(-2, ":")
172
 
173
  # Create the Salesforce record with the image URL and AI prediction
174
  record = {