gpt4 book ai didi

.net - 动态调整Azure App Service的系统时间

转载 作者:行者123 更新时间:2023-12-02 23:58:44 25 4
gpt4 key购买 nike

我们部署了一个 Azure Function (dotnet),许多操作在很大程度上依赖于当前日期/时间。

我们正在为其编写一个集成测试套件,并且非常乐意保留黑盒方法。也就是说,如果可能的话,我们宁愿不要在内部模拟日期/时间。

有没有办法调整应用服务的系统时间来实现这一点?理想情况下,应该有一种非侵入式的方式来实现这一目标,但我愿意接受轻微侵入式的选项

最佳答案

在 Azure 门户的应用服务订阅中,转到“应用程序设置”菜单。在应用程序设置下,添加此设置:

键 = WEBSITE_TIME_ZONE

值 = 您想要的时区

List of timezone values to use with linux

关于.net - 动态调整Azure App Service的系统时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67896039/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com