Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set specific time zone to Azure Functions app?

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

like image 270
Khin Thet Avatar asked Jun 14 '18 07:06

Khin Thet


People also ask

Can you schedule Azure Functions?

Like Logic Apps you can schedule Functions to perform recurring tasks and flows (durable function). One of the triggers for Azure Functions is the timer-trigger – allowing you to run a function on a schedule. With the timer trigger, you can use cron-expression to define when the function needs to run.

How do you specify app settings for an Azure Functions project?

To find the application settings, see Get started in the Azure portal. The Application settings tab maintains settings that are used by your function app. You must select Show values to see the values in the portal. To add a setting in the portal, select New application setting and add the new key-value pair.


1 Answers

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.

like image 104
Joy Wang Avatar answered Sep 21 '22 04:09

Joy Wang