Skip to content
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

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Nov 18, 2024

Important

Add localTimeFormatWithShortDate for local timezone formatting and update 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.

This description was created by Ellipsis for 75ab65e. It will automatically update as commits are pushed.

…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 -->
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 in 2 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 that localTimeFormatWithShortDate 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}`;
Copy link
Contributor

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.

Suggested change
return `${dateString} at ${timeString}`;
return `${dateString} at ${timeString} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`;

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 in 2 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}`;
Copy link
Contributor

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.

Suggested change
return `${dateString} at ${timeString}`;
return `${dateString} at ${timeString} UTC`;

return `${dateString} at ${timeString} UTC`;
}

function localTimeFormatWithShortDate(time: string): string {
Copy link
Contributor

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.

@msalihaltun msalihaltun merged commit 7120ef4 into main Nov 18, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/short-date-time-format-local branch November 18, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants