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

Switch to universal ISO 8601 date format #848

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/oss-console/src/common/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
return moment.utc(input).fromNow();
}

return formatDate(input, 'MM/DD/YY HH:MM A');
return formatDate(input, 'YYYY-MM-DD HH:MM A');

Check warning on line 65 in packages/oss-console/src/common/formatters.ts

View check run for this annotation

Codecov / codecov/patch

packages/oss-console/src/common/formatters.ts#L65

Added line #L65 was not covered by tests
}

/** Formats a date into a standard local format used throughout the UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const DatetimeInput: FC<InputProps> = (props) => {
},
}}
ampm={false}
format="MM/DD/YYYY HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
label={label}
onChange={handleChange}
value={!value?.length ? null : moment(value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,7 @@ describe('LaunchForm: Workflow', () => {
// expect datetime to be correctly prepopulated
await waitFor(() => {
// bool should be true
expect(datetimeInput!).toHaveValue('10/17/2023 19:07:39');
expect(datetimeInput!).toHaveValue('2023-10-17 19:07:39');
});

// expect no validation error
Expand Down
Loading