Hide Forgot
Description: 'oc get pod' will show pod 'AGE'. However, it gets 'AGE' according to current time from local host of oc client. When local time is earlier or later than server, and customer is unaware of this, 'AGE' will be wrong and confusing. `oc deploy <dc name>` and `oc describe dc | grep 'Created:'` have similar problem. Version-Release number of selected component (if applicable): oc v1.1-766-g2eb4afc kubernetes v1.1.0-origin-1107-g4c8e6f4 How reproducible: Always Steps to Reproduce: Note: do all steps on local host instead of server host. 1. Check resource age: $ oc get pod NAME READY STATUS RESTARTS AGE sample-1-cif39 1/1 Running 0 1m 2. Check local time $ date Fri Jan 15 10:44:00 CST 2016 3. Make local time 1 hour earlier $ sudo date "9:44" $ oc get pod NAME READY STATUS RESTARTS AGE sample-1-cif39 1/1 Running 0 <invalid> 4. Make local time 1 hour later $ sudo date -s "11:44" $ oc get pod NAME READY STATUS RESTARTS AGE sample-1-cif39 1/1 Running 0 1h Actual results: 3 ~ 4: When local time is earlier, 'AGE' is shown as '<invalid>' When local time is later, 'AGE' is shown older than it should be. Expected results: It's better to return current server time to get resource 'AGE'. Otherwise, customer would be confused.
Similar with this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1270436
The "CreationTimestamp" for a pod is created by the server. The reason you are seeing different results when changing your client's time is because your client interprets the pod's timestamp according to what it thinks the current "date" is. A solution for getting around this would be to expose the server's Date through the api, and have the client parse the timestamp using that, however after talking with David Eads, this is not something that can be done.