Forum Discussion
Bicep : The provided time T09:00:28Z does not follow the ISO 8601 standard.
Error:
New-AzResourceGroupDeployment: 10:18:37 - The deployment 'avd' failed with error(s). Showing 1 out of 1 error(s).
Status Message: The provided time T09:00:28Z does not follow the ISO 8601 standard. (Code:InvalidIso8601Time)
Code:
Herewith my code that works.
Thanks for your assistance.
resource shutdownSchedule_1 'Microsoft.DevTestLab/schedules@2018-09-15' = {name: 'shutdown-computevm-vmjump01'location: param_locationproperties: {status: 'Enabled'taskType: 'ComputeVmShutdownTask'dailyRecurrence: {time: '16:00'}timeZoneId: 'Central Europe Standard Time'targetResourceId: p_vm1_id}}
- RobinaIron Contributor
The time should be formatted according to the ISO 8601 standard, which requires the time to be in the format of "hh:mm:ss" with an optional fractional component for seconds, followed by the time zone offset in the format of "+/-hh:mm" or "Z" for UTC.
In this case, the provided time "T09:00:28Z" is missing the fractional component for seconds, which is required by the ISO 8601 standard. To fix the error, you can add the fractional component for seconds, such as "T09:00:28.000Z".
The corrected code for the dailyRecurrence property would be:
dailyRecurrence: {
time: 'T09:00:28.000Z'
}- Wim_KestensCopper ContributorThanks for your reply.
I just tested and receive the following error message:
I Status Message: The provided time T09:00:28.000Z does not follow the ISO 8601 standard. (Code:InvalidIso8601Time)
I copy pasted the format from your reply.- RobinaIron Contributor
Error message is related to the format of the timestamp.
YYYY-MM-DDThh:mm:ss.sssZ
Where:YYYY: Year
MM: Month (01-12)
DD: Day (01-31)
T: Time separator
hh: Hour (00-23)
mm: Minute (00-59)
ss: Second (00-59)
sss: Millisecond (000-999)
Z: Timezone offset (e.g. +00:00)
So, for example, the timestamp for March 1st, 2023 at 9:00:28 AM UTC would be:2023-03-01T09:00:28.000Z
To use this format when providing timestamps to any commands or APIs that require it.