我可以将特定时区设置为Azure Functions应用程序吗? [英] Can I set specific time zone to Azure Functions app?

查看:144
本文介绍了我可以将特定时区设置为Azure Functions应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请让我听听您的建议.

我在azure Web应用程序中将服务器的时区设置从UTC设置为特定的时区,它很好并且按照我期望的特定时区进行了更改. [PROCESS]应用设置:WEBSITE_TIME_ZONE =东京标准时间

I played the setting of server time zone from UTC to specific time zone at azure web apps and it was good and changed as I expected specific time zone. [PROCESS] App Setting : WEBSITE_TIME_ZONE = Tokyo Standard Time

现在,我想在功能应用程序中使用特定的时区. 但是,天蓝色功能应用程序无法像网络应用程序一样进行设置. 参考链接

Now, I want to use specific time zone within function app. But, azure functions app is not settable like as web apps. reference link

但是,此ref链接表示为仅对Web应用程序有效参考链接

But, this ref link expressed like as it only effect on web apps reference link

推荐答案

我在门户网站的应用程序"设置中设置了WEBSITE_TIME_ZONE = Tokyo Standard Time,并在Kudu中检查了时间,效果很好.

I set WEBSITE_TIME_ZONE = Tokyo Standard Time in the Application settings in the portal and check the time in Kudu, it works fine.

这是我的功能应用程序设置".

Here is my function Application settings.

如果要查找应用程序"设置,请参阅屏幕截图.

If you want to find Application settings, refer to the screenshot.

更新:

我在函数的编码(index.js)中调用时间返回了UTC时间.

I call time inside function's coding (index.js) returned the UTC time.

如果您未指定日期格式,则日期将作为

If you do not specify the date format, the Date will out put as an ISO Date Format, like YYYY-MM-DDTHH:mm:ss.sssZ, actually the time has been changed to Tokyo Standard Time instead of the UTC time.

这篇关于我可以将特定时区设置为Azure Functions应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆