@@ -132,15 +132,23 @@ func (d *DryccCmd) PsDescribe(appID, podID string) error {
132132 table .Append ([]string {"State:" , key })
133133 value := containerState .State [key ]
134134 for innerKey := range value {
135- table .Append ([]string {fmt .Sprintf (" %s:" , innerKey ), strconv .Quote (fmt .Sprintf ("%v" , value [innerKey ]))})
135+ innerValue := strconv .Quote (fmt .Sprintf ("%v" , value [innerKey ]))
136+ if innerKey == "startedAt" || innerKey == "finishedAt" {
137+ innerValue = d .formatTime (fmt .Sprintf ("%s" , value [innerKey ]))
138+ }
139+ table .Append ([]string {fmt .Sprintf (" %s:" , innerKey ), innerValue })
136140 }
137141 }
138142 // LastState
139143 for key := range containerState .LastState {
140144 table .Append ([]string {"Last State:" , key })
141145 value := containerState .LastState [key ]
142146 for innerKey := range value {
143- table .Append ([]string {fmt .Sprintf (" %s:" , innerKey ), strconv .Quote (fmt .Sprintf ("%v" , value [innerKey ]))})
147+ innerValue := strconv .Quote (fmt .Sprintf ("%v" , value [innerKey ]))
148+ if innerKey == "startedAt" || innerKey == "finishedAt" {
149+ innerValue = d .formatTime (fmt .Sprintf ("%s" , value [innerKey ]))
150+ }
151+ table .Append ([]string {fmt .Sprintf (" %s:" , innerKey ), innerValue })
144152 }
145153 }
146154 table .Append ([]string {"Ready:" , fmt .Sprintf ("%v" , containerState .Ready )})
@@ -162,7 +170,7 @@ func (d *DryccCmd) PsDescribe(appID, podID string) error {
162170 te .Append ([]string {
163171 fmt .Sprintf (" %s" , ev .Reason ),
164172 ev .Message ,
165- ev .Created . Format ( "2006-01-02T15:04:05MST" ),
173+ d . formatTime ( ev .Created ),
166174 })
167175 }
168176 te .Render ()
@@ -208,7 +216,7 @@ func printProcesses(d *DryccCmd, appID string, input []api.Pods) {
208216 pod .Type ,
209217 pod .Ready ,
210218 fmt .Sprintf ("%v" , pod .Restarts ),
211- pod .Started . Format ( "2006-01-02T15:04:05MST" ),
219+ d . formatTime ( pod .Started ),
212220 })
213221 }
214222 }
0 commit comments