-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Also add local version of short date time format #1211
Conversation
…src/' <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Adds `localTimeFormatWithShortDate` for local timezone short date formatting and updates `WorkflowRun.tsx` to use it for task creation times. > > - **Behavior**: > - Adds `localTimeFormatWithShortDate` to `timeFormat.ts` for local timezone short date formatting. > - Updates `WorkflowRun.tsx` to use `localTimeFormatWithShortDate` for displaying `created_at` of `currentRunningTask`. > - **Functions**: > - `localTimeFormatWithShortDate` handles fractional seconds and appends 'Z' if missing, formats date and time in local timezone. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for dd34d0c6ea57db1648c4aeaeab33b63e355df64c. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on 75ab65e in 27 seconds
More details
- Looked at
70
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/WorkflowRun.tsx:485
- Draft comment:
Ensure thatlocalTimeFormatWithShortDate
includes timezone information in its output to avoid ambiguity. This applies to other usages of this function as well. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_BI4DpuOn7Tj90aV5
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
const timeString = date.toLocaleTimeString("en-US", { | ||
timeZone: localTimezone, | ||
}); | ||
|
||
return `${dateString} at ${timeString}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider appending the local timezone abbreviation to the formatted string to clarify the timezone context.
return `${dateString} at ${timeString}`; | |
return `${dateString} at ${timeString} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 75ab65e in 1 minute and 1 seconds
More details
- Looked at
70
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_3QZmoh90tUxjc6Bx
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
const timeString = date.toLocaleTimeString("en-US", { | ||
timeZone: localTimezone, | ||
}); | ||
|
||
return `${dateString} at ${timeString}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider appending 'UTC' to the return string for consistency with other time format functions.
return `${dateString} at ${timeString}`; | |
return `${dateString} at ${timeString} UTC`; |
return `${dateString} at ${timeString} UTC`; | ||
} | ||
|
||
function localTimeFormatWithShortDate(time: string): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localTimeFormatWithShortDate
is a duplicate of basicLocalTimeFormat
with a different date format. Consider extending basicLocalTimeFormat
to support multiple date formats.
- function
basicLocalTimeFormat
(timeFormat.ts)
Important
Add
localTimeFormatWithShortDate
for local timezone formatting and updateWorkflowRun.tsx
to use it for task creation times.localTimeFormatWithShortDate
totimeFormat.ts
for local timezone short date formatting.WorkflowRun.tsx
to uselocalTimeFormatWithShortDate
for displayingcreated_at
ofcurrentRunningTask
.localTimeFormatWithShortDate
handles fractional seconds and appends 'Z' if missing, formats date and time in local timezone.This description was created by for 75ab65e. It will automatically update as commits are pushed.