You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just ran into this migrating the ct-patching-scanning Jenkins jobs from a host where awscli v1 was installed to a host where awscli v2 is installed. Running the Inspector Report gave me this console error: date: invalid date ‘@2024-07-08T12:08:26.315000-04:00’
This isn't a problem with the date command, but a breaking change in date format output between aws cli v1 and v2: https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration-changes.html#cliv2-migration-timestamp
By default, all dates returned to the cli are reformatted into ISO 8601 format. The fix is to configure your aws cli tool with cli_timestamp_format = wire and there is no environment variable or command line option to do this. I can confirm that this config file option fixed the script for me without the need to change any code.
If a fix is desired, it could be along the lines of conditionally removing the prefixed @ from the date input; while this gives an error: date --date='@2024-07-08T11:00:02.414000-04:00'
this works fine: date --date='2024-07-08T11:00:02.414000-04:00'
That might be desired for the long term, since the "wire" option only refrains from reformatting the date stamp that's delivered from the inspector service. If a future update to the inspector service outputs the date in ISO 8601 format, the config file option won't fix the format.
The text was updated successfully, but these errors were encountered:
I just ran into this migrating the ct-patching-scanning Jenkins jobs from a host where awscli v1 was installed to a host where awscli v2 is installed. Running the Inspector Report gave me this console error:
date: invalid date ‘@2024-07-08T12:08:26.315000-04:00’
This isn't a problem with the date command, but a breaking change in date format output between aws cli v1 and v2:
https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration-changes.html#cliv2-migration-timestamp
By default, all dates returned to the cli are reformatted into ISO 8601 format. The fix is to configure your aws cli tool with
cli_timestamp_format = wire
and there is no environment variable or command line option to do this. I can confirm that this config file option fixed the script for me without the need to change any code.If a fix is desired, it could be along the lines of conditionally removing the prefixed @ from the date input; while this gives an error:
date --date='@2024-07-08T11:00:02.414000-04:00'
this works fine:
date --date='2024-07-08T11:00:02.414000-04:00'
That might be desired for the long term, since the "wire" option only refrains from reformatting the date stamp that's delivered from the inspector service. If a future update to the inspector service outputs the date in ISO 8601 format, the config file option won't fix the format.
The text was updated successfully, but these errors were encountered: