-
Notifications
You must be signed in to change notification settings - Fork 174
Fix DateTime parsing fails on non-US locale runners #2047
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
base: main
Are you sure you want to change the base?
Changes from all commits
7546918
a034eb2
dc6fa1f
3e1c750
2833097
44c6785
c35f62d
5702191
ad05b6b
5952fd6
dbce971
0d64c05
049409f
6b92269
efc102a
b90d721
bee17fb
7594d99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,47 @@ | ||||||
| <# | ||||||
| .SYNOPSIS | ||||||
| Helper functions for WorkflowPostProcess action | ||||||
|
|
||||||
| .DESCRIPTION | ||||||
| Contains utility functions used by the WorkflowPostProcess action and its tests | ||||||
| #> | ||||||
|
|
||||||
| <# | ||||||
| .SYNOPSIS | ||||||
| Calculate the duration of a workflow from a start time | ||||||
|
|
||||||
| .DESCRIPTION | ||||||
| Calculates the duration in seconds from the provided start time to the current UTC time. | ||||||
| Handles both DateTime objects and string representations in ISO 8601 format. | ||||||
|
|
||||||
| .PARAMETER StartTime | ||||||
| The workflow start time as either a DateTime object or a string in ISO 8601 format | ||||||
|
||||||
| The workflow start time as either a DateTime object or a string in ISO 8601 format | |
| The workflow start time as either a DateTime object or a string in ISO 8601 format or other culture-independent date format |
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.
The documentation states that the function "Handles both DateTime objects and string representations in ISO 8601 format," but the implementation actually accepts and parses any date format that InvariantCulture can understand, not just ISO 8601. Consider updating the description to accurately reflect that the function handles various culture-independent date formats or locale-specific formats that can be parsed by InvariantCulture.