Skip to content

Commit f33c811

Browse files
fix: update workflow date formatting to use IST timezone and 24-hour format
1 parent 5442a18 commit f33c811

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

frontend/src/components/workflow/WorkflowBuilder.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2812,7 +2812,7 @@ const WorkflowBuilderInternal: React.FC<WorkflowBuilderProps> = ({
28122812

28132813
// Create form data matching the curl command format
28142814
const formData: Record<string, any> = {
2815-
name: `${currentTemplate?.name || "Workflow"} - ${new Date().toLocaleString()}`,
2815+
name: `${currentTemplate?.name || "Workflow"} - ${new Date().toLocaleString("en-US", { timeZone: "Asia/Kolkata", hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' })}`,
28162816
description: `Execution of ${currentTemplate?.name || "workflow"} with file: ${file.name}`,
28172817
file_description: `Test document: ${file.name}`,
28182818
}

frontend/src/components/workflow/WorkflowExecutionModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function WorkflowExecutionModal({
164164
try {
165165
// Create form data matching the curl command format
166166
const formData: Record<string, any> = {
167-
name: `${workflowName} - ${new Date().toLocaleString()}`,
167+
name: `${workflowName} - ${new Date().toLocaleString("en-IN", { timeZone: "Asia/Kolkata", hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' })}`,
168168
description: `Execution of ${workflowName} with file: ${file.name}`,
169169
file_description: `Test document: ${file.name}`,
170170
}

frontend/src/components/workflow/executedWorkflowRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ const ExecutionSidebar = ({
11261126
Completed:
11271127
</span>
11281128
<span className="text-xs text-gray-900">
1129-
{new Date(step.completedAt).toLocaleString()}
1129+
{new Date(step.completedAt).toLocaleString("en-US", { timeZone: "Asia/Kolkata", hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' })}
11301130
</span>
11311131
</div>
11321132
)}

server/api/workflow.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ export const ExecuteWorkflowWithInputApi = async (c: Context) => {
422422
workspaceId: user.workspaceId,
423423
name:
424424
requestData.name ||
425-
`${template[0].name} - ${new Date().toLocaleDateString()}`,
425+
`${template[0].name} - ${new Date().toLocaleString("en-IN", { timeZone: "Asia/Kolkata", hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' })}`,
426426
description:
427427
requestData.description || `Execution of ${template[0].name}`,
428428
metadata: {
@@ -740,7 +740,7 @@ export const ExecuteWorkflowTemplateApi = async (c: Context) => {
740740
workspaceId: user.workspaceId,
741741
name:
742742
requestData.name ||
743-
`${template[0].name} - ${new Date().toLocaleDateString()}`,
743+
`${template[0].name} - ${new Date().toLocaleString("en-IN", { timeZone: "Asia/Kolkata", hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' })}`,
744744
description:
745745
requestData.description || `Execution of ${template[0].name}`,
746746
metadata: requestData.metadata || {},
@@ -1913,7 +1913,7 @@ const executeWorkflowTool = async (
19131913
<div class="content">
19141914
<div class="header">
19151915
<h2>🤖 Results of Workflow: ${workflowName} </h2>
1916-
<p>Generated on: ${new Date().toLocaleString("en-US", { timeZone: "Asia/Kolkata" })}</p>
1916+
<p>Generated on: ${new Date().toLocaleString("en-IN", { timeZone: "Asia/Kolkata", hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' })}</p>
19171917
</div>
19181918
<div class="body-content">
19191919
${emailBody.replace(/\n/g, "<br>")}

0 commit comments

Comments
 (0)