Home > front end >  How to handle the set the timezone to MST in Spring batch application that runs in AKS which follows
How to handle the set the timezone to MST in Spring batch application that runs in AKS which follows

Time:12-28

I have a Spring batch application running in a VM hosted in MTC timezone. I am migrating this application to AKS which follows UTC.

I want to set MTC as my default timezone due to the business logic.

I could see the below options

  1. Update the individual line of code to convert the UTC to MTC - not an efficient way.
  2. Set the Default timezone - How to do this in spring batch? I could see this for spring boot but not for spring batch
  3. Set Timezone at Container level (https://medium.com/@yildirimabdrhm/kubernetes-timezone-management-8cc139b01f9d)

Please suggest?

CodePudding user response:

End up using

java -Duser.timezone=America/Denver

  • Related