juju status --utc does not display utc and is confused

Bug #1459611 reported by Stuart Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Ian Booth
1.24
Fix Released
High
Ian Booth

Bug Description

The --utc flag on juju status claims: "display time as UTC in RFC3339 format".

It does not do that. It is displaying my local time and an offset.

          since: 2015-05-28T16:56:38+07:00

The UTC time is actually 2015-05-28T09:56:38Z. This is what people want to see when they specify --utc. The whole point is to not have to do the date arithmetic in your head.

In addition, please consider the following paragraph in RFC3339:

      NOTE: ISO 8601 defines date and time separated by "T".
      Applications using this syntax may choose, for the sake of
      readability, to specify a full-date and full-time separated by
      (say) a space character.

It exists because most people hate having the T, and it is only useful to parsers if the time-of-day portion of timestamp is optional. It is not optional here, so we should opt for the readable format.

Tags: status ui
Ian Booth (wallyworld)
Changed in juju-core:
milestone: none → 1.25.0
importance: Undecided → High
status: New → Triaged
Revision history for this message
Ian Booth (wallyworld) wrote :

I can't reproduce this. I'm GMT+10 and it appears to work as expected:

ian@wallyworld:~$ juju status-history mysql/0
TIME TYPE STATUS MESSAGE
29 May 2015 14:29:13 AEST workload unknown Waiting for agent initialization to finish
29 May 2015 14:29:13 AEST agent allocating
29 May 2015 14:29:22 AEST workload maintenance installing charm software

ian@wallyworld:~$ juju status-history --utc mysql/0
TIME TYPE STATUS MESSAGE
2015-05-29T04:29:13Z workload unknown Waiting for agent initialization to finish
2015-05-29T04:29:13Z agent allocating
2015-05-29T04:29:22Z workload maintenance installing charm software
2015-05-29T04:29:22Z agent executing running install hook

Or yaml:

<snip>
...
    units:
      mysql/0:
        workload-status:
          current: unknown
          since: 2015-05-29T04:30:23Z
        agent-status:
          current: idle
          since: 2015-05-29T04:30:26Z
          version: 1.24-beta6.1
        machine: "0"
        public-address: 52.28.51.113

Revision history for this message
Ian Booth (wallyworld) wrote :

Not sure what's going on - maybe related to Go version. I made some changes to explicitly for UTC and to manually specify the format rather than using Go's built in RFC3339 format. When the change lands soon, would appreciate a re-test

Changed in juju-core:
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Ian Booth (wallyworld)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: status ui
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.