Azure-cli: webapp:Setting date in App Service app setting converts date to different format

Created on 15 Aug 2019  路  6Comments  路  Source: Azure/azure-cli

When using the az webapp config appsettings set command to set an App Service app setting to an ISO-8601 date string (YYYY-MM-DDTHH:mm:ssZ), the date string gets converted into a date that loses time zone information and introduces uncertainty into day and month ordering.

To reproduce:

1) Create App Service.
2) Run the following command: az webapp config appsettings set --name <app-service-name> --resource-group <resource-group> --settings=BUILD_DATE=2019-12-09T19:42:25Z

Observed behaviour:

Output from above command:

[
  {
    "name": "BUILD_DATE",
    "slotSetting": false,
    "value": "12/09/2019 19:42:25"
  }
]

When observing the app setting via the portal, the date is also in the incorrect format.

Expected behaviour:

[
  {
    "name": "BUILD_DATE",
    "slotSetting": false,
    "value": "2019-12-09T19:42:25Z"
  }
]

Environment Summary

Darwin-18.7.0-x86_64-i386-64bit
Python 3.7.5
Shell: bash

azure-cli 2.0.76 *

Extensions:
front-door 1.0.2
storage-preview 0.2.9

customer-reported question

All 6 comments

So what is the az command to install the updates, if there is any? I can't seem to find it anywhere.

az --upgrade would be to simple to expect?

@SQLHorizons that would be the most logical thing, but sadly it doesn't work :/

@SQLHorizons @HimeshRavi Thanks for the suggestion, but since CLI is installed on different platforms with different methods, it will be difficult for CLI to self-update.

even if it's not possible to provide detailed update instructions as discussed in the documentation-issue at least for extensions it should say to use az extension update <EXTENSIONNAME>

The original issue description was replaced with the contents from https://github.com/Azure/azure-rest-api-specs/issues/10250 by @azure-sdk and got reopened. Is the bot going nuts?

Was this page helpful?
0 / 5 - 0 ratings