Azure / Azure-Functions

1.1k stars 189 forks source link

App settings performing unwanted changes on strings that look like date times #2491

Open asos-martinsmith opened 4 weeks ago

asos-martinsmith commented 4 weeks ago

I have an app setting with value "2024-05-18T00:00:00.000Z".

Immediately after deployment I noticed that it was showing up as "05/18/2024 00:00:00"

I tried changing it back to "2024-05-18T00:00:00.000Z" in the Portal but that too got converted to "05/18/2024 00:00:00".

Expected behaviour is that the function app should not be changing app settings in any way.

In my case the app setting is being used in a CosmosDB trigger StartFromTime attribute and this requires the ISO format - not this other format.

(I have seen similar unwanted behaviour before with Newtonsoft.Json - not sure if that is also causing the issue here https://github.com/JamesNK/Newtonsoft.Json/issues/862)

bhagyshricompany commented 3 weeks ago

Thanks for reporting please share the all repro steps.Thanks

asos-martinsmith commented 3 weeks ago

They are already shared.

Go into the portal.

Change an app setting to "2024-05-18T00:00:00.000Z"

Marvel as it gets silently changed to "05/18/2024 00:00:00"

bhagyshricompany commented 1 week ago

@fabiocav please comment.Thanks