Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Also add local version of short date time format (#1211)
Shuchang Zheng7120ef42a0ee
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsxindex be3906908..177f6bd17 100644--- a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx+++ b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx@@ -35,6 +35,7 @@ import { apiBaseUrl, envCredential } from "@/util/env";import {basicLocalTimeFormat,basicTimeFormat,+ localTimeFormatWithShortDate,timeFormatWithShortDate,} from "@/util/timeFormat";import { cn } from "@/util/utils";@@ -475,10 +476,14 @@ function WorkflowRun() {<Label className="text-sm text-slate-400">Created</Label><spanclassName="truncate text-sm"- title={basicLocalTimeFormat(currentRunningTask.created_at)}+ title={timeFormatWithShortDate(+ currentRunningTask.created_at,+ )}>{currentRunningTask &&- timeFormatWithShortDate(currentRunningTask.created_at)}+ localTimeFormatWithShortDate(+ currentRunningTask.created_at,+ )}</span></div><div className="mt-auto flex justify-end">diff --git a/skyvern-frontend/src/util/timeFormat.ts b/skyvern-frontend/src/util/timeFormat.tsindex dcb7d2753..62a574607 100644--- a/skyvern-frontend/src/util/timeFormat.ts+++ b/skyvern-frontend/src/util/timeFormat.ts@@ -42,7 +42,34 @@ function timeFormatWithShortDate(time: string): string {const dateString =date.getMonth() + 1 + "/" + date.getDate() + "/" + date.getFullYear();const timeString = date.toLocaleTimeString("en-US");+ return `${dateString} at ${timeString} UTC`;+}++function localTimeFormatWithShortDate(time: string): string {+ // Adjust the fractional seconds to milliseconds (3 digits)+ time = time.replace(/\.(\d{3})\d*/, ".$1");++ // Append 'Z' to indicate UTC time if not already present+ if (!time.endsWith("Z")) {+ time += "Z";+ }++ const date = new Date(time);+ const localTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;++ const dateString =+ date.getMonth() + 1 + "/" + date.getDate() + "/" + date.getFullYear();++ const timeString = date.toLocaleTimeString("en-US", {+ timeZone: localTimezone,+ });+return `${dateString} at ${timeString}`;}-export { basicLocalTimeFormat, basicTimeFormat, timeFormatWithShortDate };+export {+ basicLocalTimeFormat,+ basicTimeFormat,+ timeFormatWithShortDate,+ localTimeFormatWithShortDate,+};