The Wayback Machine - https://web.archive.org/web/20190601131630/https://github.com/influxdata/influxdb/issues/12374
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swagger: define type for rfc3339nano timestamps #12374

Open
mark-rushakoff opened this issue Mar 5, 2019 · 0 comments

Comments

2 participants
@mark-rushakoff
Copy link
Member

commented Mar 5, 2019

Tasks use some rfc3339nano timestamps in a few places. #12280 is related to a run's startedAt and finishedAt values not matching swagger, because the type is defined as date-time in swagger but rfc3339nano doesn't match.

Dashboards' createdAt and updatedAt have the same issue; see #12298.

There may be other places than those two, but those are the only two outstanding issues I know of.

To fix this generally, we should have a swagger type that is capable of displaying subsecond precision.

Note, one drawback of the default rfc3339nano formatting:

The RFC3339Nano format removes trailing zeros from the seconds field and thus may not sort correctly once formatted.

FWIW, flux has a workaround to avoid removing trailing zeros: https://github.com/influxdata/flux/blob/16950c44f1433dd34f656a4128adeed73d270fcc/values/time.go#L52-L62

If we decide that sortability is a property worth keeping, we could find a way to standardize on what flux is doing there for printing out timestamps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.