I have a Spring Batch/Spring Cloud Task which I deploy to PCF using Spring Cloud Dataflow. I am trying to define the timezone (JAVA_OPTS:'-Duser.timezone=America/New_York'
) somewhere in Dataflow so that any Task deployed to it, inherits the timezone.
So far I was able to define it as a user-provided env variable for Dataflow in PCF, and I see Dataflow logs show the correct timezone. However, when I deploy my Task using dataflow, the timezone in the Task logs remains at the default of UTC.
As mentioned here: CloudFoundry Timezone, I can define it the same way (as a user provided env var) directly on the task, and then the Task takes the correct timezone. But since I have over 30 of these Tasks, I need a way to define it at the Dataflow level, and have all the Tasks inherit it.
I've also tried defining it at the Task Definition level with no luck.
How can I define the -Duser.timezone property at the Dataflow level for all Tasks to inherit? Or if not possible, where is the correct place to define it externally?
Thanks.