updated range example, added now function
parent
c930cdb7b8
commit
2ed07ad4ec
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: now() function
|
||||
description: The `now()` function returns the current system time.
|
||||
aliases:
|
||||
- /v2.0/reference/flux/functions/misc/systemtime
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: now
|
||||
parent: built-in-misc
|
||||
weight: 401
|
||||
---
|
||||
|
||||
The `now()` function returns the current time (GMT).
|
||||
|
||||
_**Function type:** Date/Time_
|
||||
_**Output data type:** Time_
|
||||
|
||||
```js
|
||||
now()
|
||||
```
|
||||
|
||||
## Examples
|
||||
```js
|
||||
data
|
||||
|> range(start: -10h, stop: now())
|
||||
```
|
|
@ -21,5 +21,5 @@ systemTime()
|
|||
|
||||
## Examples
|
||||
```js
|
||||
offsetTime = (offset) => systemTime() |> shift(shift: offset)
|
||||
offsetTime = (offset) => systemTime() |> timeShift(duration: offset)
|
||||
```
|
||||
|
|
|
@ -20,7 +20,7 @@ _**Function type:** Transformation_
|
|||
_**Output data type:* Object_
|
||||
|
||||
```js
|
||||
range(start: -15m, stop: now)
|
||||
range(start: -15m, stop: now())
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
@ -45,7 +45,7 @@ _**Data type:** Duration or Timestamp_
|
|||
|
||||
{{% note %}}
|
||||
Flux only honors [RFC3339 timestamps](/v2.0/reference/flux/language/types#timestamp-format)
|
||||
and ignores dates and times provided in other formats.
|
||||
and ignores dates and times provided in other formats.
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
|
Loading…
Reference in New Issue