Azure-Player / azure.datafactory.tools

Tools for deploying Data Factory (v2) in Microsoft Azure
https://azureplayer.net/adftools
MIT License
219 stars 70 forks source link

Mismatched datetime formatting in variable replacement #301

Closed josephniblo closed 1 year ago

josephniblo commented 1 year ago

Describe the bug When updating a datetime parameter of the factory using a JSON file and -Stage, the datetime is parsed before replacing the parameter. The replaced datetime is then formatted, but not in the manner expected, with the timezone identifier omitted, resulting in an error on deployment:

Start-AzDataFactoryV2Trigger `
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP Status Code: BadRequest Error Code: BadRequest Error Message: ErrorCode=InvalidWorkflowTriggerRecurrence,
ErrorMessage=The recurrence of trigger has an invalid start time '2023-02-27T00:30:00.0000000' zone designator
for time zone 'UTC'. Expected start time format with zone designator is 'yyyy-MM-ddTHH:mm:ssZ'. Request Id:
... Timestamp (Utc): ...

To Reproduce Try to deploy a factory configuration using JSON variable replacement, with action "update".

Version of PowerShell module of: Powershell 7.3.3 azure.datafactory.tools 1.3.0

NowinskiK commented 1 year ago

Are you able to update one of the unit tests to present this bug?