Can I set specific time zone to Azure Functions ap

2019-08-03 18:33发布

Please let me hear your advice.

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

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

1条回答
Evening l夕情丶
2楼-- · 2019-08-03 18:55

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

enter image description here

Here is my function Application settings.

enter image description here

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

enter image description here

Update:

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.

查看更多
登录 后发表回答