Different timezone when running "oc logs --timestamps" in OpenShift

Solution Verified - Updated -

Issue

  • According to Solution - How to set timezone for pods in OpenShift, when set env TZ=Asia/Tokyo, the timestamp in the log seems to follow the timezone.
    However, when I executed oc logs command with --timestamps option, the timestamp seems not to follow the timezone as follows.
    Is it possible to change the timezone of the log which is output with --timestamps option?
2018-09-13T07:32:20.466762000Z 16:32:20,450 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
2018-09-13T07:32:20.467104000Z 16:32:20,450 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0054: Admin console is not enabled
2018-09-13T07:32:20.467392000Z 16:32:20,450 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Red Hat Single Sign-On 7.2.1.GA (WildFly Core 3.0.12.Final-redhat-1) started in 20373ms - Started 660 of 1059 services (759 services are lazy, passive or on-demand)

Environment

  • Red Hat OpenShift Container Platform 3.X
  • Red Hat OpenShift Container Platform 4.X

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In