added rfc3339 timestamp to glossary

pull/1009/head
Scott Anderson 2020-05-04 16:27:52 -06:00
parent 211c39261d
commit 4fcc8d5239
5 changed files with 20 additions and 18 deletions

View File

@ -33,18 +33,19 @@ If you're just getting started with Flux queries, check out the following:
## Convert timestamp format
### Convert nanosecond epoch timestamp to RFC3339
### Convert unix nanosecond timestamp to RFC3339
Use the [`time()` function](/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/time/)
to convert a **nanosecond** epoch timestamp to an RFC3339 timestamp.
to convert a [unix **nanosecond** timestamp](/v2.0/reference/glossary/#unix-timestamp)
to an [RFC3339 timestamp](/v2.0/reference/glossary/#rfc3339-timestamp).
```js
time(v: 1568808000000000000)
// Returns 2019-09-18T12:00:00.000000000Z
```
### Convert RFC3339 to nanosecond epoch timestamp
### Convert RFC3339 to nanosecond unix timestamp
Use the [`uint()` function](/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/uint/)
to convert an RFC3339 timestamp to a nanosecond epoch timestamp.
to convert an RFC3339 timestamp to a unix nanosecond timestamp.
```js
uint(v: 2019-09-18T12:00:00.000000000Z)
@ -55,8 +56,8 @@ uint(v: 2019-09-18T12:00:00.000000000Z)
Flux doesn't support mathematical operations using [time type](/v2.0/reference/flux/language/types/#time-types) values.
To calculate the duration between two timestamps:
1. Use the `uint()` function to convert each timestamp to a nanosecond epoch timestamp.
2. Subtract one nanosecond epoch timestamp from the other.
1. Use the `uint()` function to convert each timestamp to a unix nanosecond timestamp.
2. Subtract one unix nanosecond timestamp from the other.
3. Use the `duration()` function to convert the result into a duration.
```js

View File

@ -75,7 +75,7 @@ The time type name is `time`.
The time type is nullable.
#### Timestamp format
Flux supports [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6) timestamps:
Flux supports [RFC3339 timestamps](/v2.0/reference/glossary/#rfc3339-timestamp):
- `YYYY-MM-DD`
- `YYYY-MM-DDT00:00:00Z`

View File

@ -22,7 +22,7 @@ json.encode(v: "some value")
This function encodes [Flux types](/v2.0/reference/flux/language/types/) as follows:
- `time` values in [RFC3339](https://tools.ietf.org/html/rfc3339) format
- `time` values in [RFC3339](/v2.0/reference/glossary/#rfc3339-timestamp) format
- `duration` values in number of milliseconds since the epoch
- `regexp` values as their string representation
- `bytes` values as base64-encoded strings

View File

@ -779,6 +779,13 @@ Related entries: [duration](#duration), [measurement](#measurement), [replicatio
-->
### RFC3339 timestamp
A timestamp that uses the human readable DateTime format proposed in
[RFC 3339](https://tools.ietf.org/html/rfc3339) (for example: `2020-01-01T00:00:00.00Z`).
Flux and InfluxDB clients return query results with RFC3339 timestamps.
Related entries: [timestamp](#timestamp), [unix timestamp](#unix-timestamp)
## S
### schema
@ -927,13 +934,8 @@ Related entries: [bin](#bin)
### step-plot
<<<<<<< HEAD
A data visualization that displays time series data in a staircase graph.
Generate a step-plot using the step [interpolation option for line graphs](/v2.0/visualize-data/visualization-types/graph/#options).
=======
In InfluxDB 1.x, a [step-plot graph](https://docs.influxdata.com/chronograf/v1.7/guides/visualization-types/#step-plot-graph) displays time series data in a staircase graph.
In InfluxDB 2.0, generate a similar graph using the step interpolation option for [line graphs](/v2.0/visualize-data/visualization-types/graph/#options).
>>>>>>> master
### stream
@ -1025,7 +1027,7 @@ Time in InfluxDB is in UTC.
To specify time when writing data, see [Elements of line protocol](/v2.0/reference/syntax/line-protocol/#elements-of-line-protocol).
To specify time when querying data, see [Query InfluxDB with Flux](/v2.0/query-data/get-started/query-influxdb/#2-specify-a-time-range).
Related entries: [point](#point), [unix timestamp](#unix-timestamp)
Related entries: [point](#point), [unix timestamp](#unix-timestamp), [RFC3339 timestamp](#rfc3339-timestamp)
### token
@ -1077,8 +1079,7 @@ An implicit block that encompasses all Flux source text in a universe block.
### unix timestamp
The number of a given unit of time since the **Unix Epoch (1970-01-01T00:00:00Z UTC)**.
The unit of time is also known as the [precision](#precision).
Counts time since **Unix Epoch (1970-01-01T00:00:00Z UTC)** in specified units ([precision](#precision)).
Specify timestamp precision when [writing data to InfluxDB](/v2.0/write-data/).
InfluxDB supports the following unix timestamp precisions:
@ -1091,7 +1092,7 @@ InfluxDB supports the following unix timestamp precisions:
<p style="font-size:.9rem;margin-top:-2rem"><em>The examples above represent <strong>2020-01-01T00:00:00Z UTC</strong>.</em></p>
Related entries: [timestamp](#timestamp)
Related entries: [timestamp](#timestamp), [RFC3339 timestamp](#rfc3339-timestamp)
### user

View File

@ -40,7 +40,7 @@ _Hover over highlighted terms to get acquainted with InfluxDB terminology and la
## Timestamp
All data stored in InfluxDB has a `_time` column that stores timestamps. On disk, timestamps are stored in epoch nanosecond format. InfluxDB formats timestamps show the date and time in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) UTC associated with data. Timestamp precision is important when you write data.
All data stored in InfluxDB has a `_time` column that stores timestamps. On disk, timestamps are stored in epoch nanosecond format. InfluxDB formats timestamps show the date and time in [RFC3339](/v2.0/reference/glossary/#rfc3339-timestamp) UTC associated with data. Timestamp precision is important when you write data.
## Measurement