"juju resources" revision date format uses year-date-month format instead of year-month-date
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Harry Pidcock |
Bug Description
I just noticed the timestamps listed per "juju resources" appear off. This is on Juju 2.9.5.
$ juju resources kubernetes-master
Resource Supplied by Revision
cdk-addons admin 2021-25-06T23:14
core charmstore 0
kube-apiserver charmstore 0
kube-controller
kube-proxy charmstore 0
kube-scheduler charmstore 0
kubectl charmstore 0
That revision looks close to an ISO 8601 style date, except that it has the month and date flipped around. I'd expect to see this as 2021-06-25T23:14 (or perhaps even 2021-06-25T23:14Z), if ISO 8601 dates are the intent here.
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Yep, that's a bug.
func combinedRevision(r resource.Resource) string { OriginStore: OriginUpload: IsZero( ) { Format( "2006-02- 01T15:04" )
switch r.Origin {
case charmresource.
// Have to check since 0+ is a valid revision number
if r.Revision >= 0 {
return fmt.Sprintf("%d", r.Revision)
}
case charmresource.
if !r.Timestamp.
return r.Timestamp.
}
}
return "-"
}