What is default timezone when I publish my app in the cloud ? How do I change the timezone if there's such option ?
Any reference to this feature is greatly appreciated.
Using the Cloud Foundry Command Line Interface (cf CLI), you can run the cf env command to view the Cloud Foundry environment variables for your app. The cf env command displays the following environment variables: The VCAP_APPLICATION and VCAP_SERVICES variables provided in the container environment.
VCAP_SERVICES variables provided in the container environment in which the application runs. VCAP_SERVICES environment variable is in JSON data structure. Cloud Foundry makes sure that multiple JSON elements can be set in the VCAP_SERVICES JSON.
You can modify environment variables associated with an application while the application is running using the cf set-env (to set or update) and cf unset-env (to delete). This will update the environment variable in Cloud Controller at the time you run the command.
The clock on run.pivotal.io is set to UTC. If you're deploying to there you would have to adjust the time using your app. If you are using your own instance of Cloud Foundry and wanted all the components running in a different timezone other than UTC I believe you would have to create a bosh errand to re-configure the timezone on each job.
Personally, I think your best option is to stick with UTC and offset using your app code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With