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

Convert ISO to UTC for Date/Time in workflow reports #16758

Merged
merged 9 commits into from
Oct 20, 2023

Conversation

assuntad23
Copy link
Contributor

Part of #16556
Instead of printing out ISO date time, dislpaying time format in UTC.

How to test the changes?

(Select all options that apply)

  • Instructions for manual testing are as follows:
    1. Create a Workflow report with "Time workflow was invoked" added to your report
    2. Note that the time that is displayed is in UTC/GMT time.

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@assuntad23 assuntad23 marked this pull request as ready for review September 28, 2023 15:57
@github-actions github-actions bot added this to the 23.2 milestone Sep 28, 2023
Comment on lines 22 to 23
const iso = new Date(invocation && invocation["create_time"]);
return iso.toUTCString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but does that need to be fixed in the PDF as well ?

@assuntad23 assuntad23 requested a review from mvdbeek September 29, 2023 19:28
@mvdbeek
Copy link
Member

mvdbeek commented Sep 30, 2023

Can you please run make format and fix the unit tests ?

@assuntad23 assuntad23 changed the title Workflow Enhancement: Converting ISO to UTC for Invocation Date/Time WF Report Enhancement: Converting ISO to UTC for Invocation Date/Time Oct 2, 2023
@@ -280,7 +280,8 @@ def test_generate_invocation_time(self):
invocation = self._new_invocation()
self.app.workflow_manager.get_invocation.side_effect = [invocation] # type: ignore[attr-defined,union-attr]
result = self._to_basic(example)
assert f"\n {invocation.create_time.isoformat()}" in result
expectedtime = invocation.create_time.strftime("%m/%d/%Y, %H:%M:%S")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the iso date format ( [YYYY]-[MM]-[DD]) ?

lib/galaxy/managers/markdown_util.py Outdated Show resolved Hide resolved
test/unit/app/managers/test_markdown_export.py Outdated Show resolved Hide resolved
changing format of string time to more closely match iso format
changing format of string time to more closely match iso format
@assuntad23 assuntad23 requested a review from mvdbeek October 18, 2023 00:13
@dannon dannon merged commit 6954aa1 into galaxyproject:dev Oct 20, 2023
43 checks passed
@mvdbeek mvdbeek changed the title WF Report Enhancement: Converting ISO to UTC for Invocation Date/Time Convert ISO to UTC for Date/Time in workflow reports Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants