Eamonn M.R.
Eamonn M.R.

Reputation: 2037

What type of timestamp does "gcloud compute instances list" produce

When you output gcloud compute instances list as json, the timestamps look like this:

2016-05-22T12:22:29.285-07:00

But I can't find an explanation of the format in the documentation. I would interpret it as:

YYYY-MM-DDT<hours>:<minutes>:<seconds>.<fraction>-<timezone>

Upvotes: 1

Views: 1423

Answers (1)

jarmod
jarmod

Reputation: 78573

I doubt there's a documented guarantee on how the timestamps are emitted but this appears to be RFC3339 with fractional seconds. Your interpretation is basically correct except that:

  • YYYY-MM-DD-T is actually YYYY-MM-DDT, a simple typo I'm sure
  • -<timezone> is actually +/- time offset from UTC

Upvotes: 2

Related Questions