Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
| 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 = {
|