updated range example, added now function

pull/207/head
Scott Anderson 2019-05-01 13:40:55 -06:00
parent c930cdb7b8
commit 2ed07ad4ec
3 changed files with 29 additions and 3 deletions

View File

@ -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())
```

View File

@ -21,5 +21,5 @@ systemTime()
## Examples
```js
offsetTime = (offset) => systemTime() |> shift(shift: offset)
offsetTime = (offset) => systemTime() |> timeShift(duration: offset)
```

View File

@ -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