Dynamically Adjust System Time of Azure App Service

Viewed 121

We have an Azure Function (dotnet) deployed that relies heavily on the current date/time for many operations.

We are writing an integration test suite for it and would really love to keep a blackbox approach. That is, we'd rather not internally mock the date/time if possible.

Is there a way to adjust the system time of the app service to achieve this? Ideally, there would be a non-intrusive way to achieve this, but I'm open to lightly-instrusive options

2 Answers

In the Azure portal, in your App Service subscription, go to the Application settings menu. Under App settings, add this setting:

Key = WEBSITE_TIME_ZONE

Value = The time zone you want

List of timezone values to use with linux

Related