Changing date and time on Azure Web App

Rahul Pon 1 Reputation point
2020-07-10T18:50:39.54+00:00

I have a Windows-based Web App running on Azure.
The date and time of the Web App needs to be changed for testing.
I was able to change the time zone via the Web App Configuration page, though I am not able to find the setting using which I could change the date.

The date and time needs to be set back by a couple of days to run some tests and for a demo to the project team.
I am attaching a screenshot for your reference.

Any help would be appreciated!

11718-1.png

11719-2.png

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,806 Reputation points
    2020-07-13T19:06:20.437+00:00

    Hi @RahulPon-6261,

    To change the entire date/time, it would require a system wide setting and since its a PaaS setting, we can't meddle with the system time. We would advise using a different method such as reading the datetime from a persistent source like table storage and trigger the job that way and not rely on system time.

    But there is a workaround you can try. It looks like your scenario may be possible but for Linux based containers not windows. Based on this SO thread, you will need to configure the SSH server in the custom image and then you can ssh into the container to debug after you deploy the image to Azure Web App. You can set the date/time by including this faketime library in your Docker Image. Please keep in mind that the library is not maintained by Microsoft.

    hope that helps.

    -Grace

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.