Set timezone for the nginx service in openshift to EST

1/7/2020

If i check the logs of the pod which is of type nginx ui service in Openshift i see that it is getting written in Zulu time stamp. How do i change that to EST?

for example:

2020/01/06 19:00:22 [notice] 1#0: using the "poll" event method 2020/01/06 19:00:22 [notice] 1#0: nginx/1.12.1 2020/01/06 19:00:22 [notice] 1#0: built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 2020/01/06 19:00:22 [notice] 1#0: OS: Linux 3.10.0-1062.1.1.el7.x86_64

I took an approach to set the time zone during the deployment through jenkins. I wrote the below snippet in my jenkins file:

helmInstall name: "${cfg.projectName}-dev",
  chart: ".helm/${cfg.projectName}",
  tillerNamespace: 'myplatform-ops',
  namespace: "myplatform-dev",
  args: [
    "--set imagestream.tag=${cfg.tagName}",
    "--set deployEnv=dev",
    "--set imagestream.namespace=myplatform",
    "--set imagestream.name=${cfg.deploymentName}-dev",
    "--set timezone='America/New_York'",
    "--debug --force"
  ]

here i have set the timezone as required. but even then after the jenkins build and deploy is complete the pod shows Z timezone instead of EST

i think the way how i am setting the timezone property within the args is incorrect and i would like to see the right way to do it.

Any Help much appreciated

-- lr-pal
jenkins
kubernetes-helm
openshift
redhat

0 Answers