commit
783ded263f
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: now() function
|
||||
description: The `now()` function returns the current time (GMT).
|
||||
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())
|
||||
```
|
|
@ -1,25 +0,0 @@
|
|||
---
|
||||
title: systemTime() function
|
||||
description: The `systemTime()` function returns the current system time.
|
||||
aliases:
|
||||
- /v2.0/reference/flux/functions/misc/systemtime
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: systemTime
|
||||
parent: built-in-misc
|
||||
weight: 401
|
||||
---
|
||||
|
||||
The `systemTime()` function returns the current system time.
|
||||
|
||||
_**Function type:** Date/Time_
|
||||
_**Output data type:** Timestamp_
|
||||
|
||||
```js
|
||||
systemTime()
|
||||
```
|
||||
|
||||
## Examples
|
||||
```js
|
||||
offsetTime = (offset) => systemTime() |> shift(shift: 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
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: Flux system package
|
||||
list_title: System package
|
||||
description: >
|
||||
The Flux system package provides functions for reading values from the system.
|
||||
Import the `system` package.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: System
|
||||
parent: Flux packages and functions
|
||||
weight: 204
|
||||
v2.0/tags: [system, functions, package]
|
||||
---
|
||||
|
||||
The Flux system package provides functions for reading values from the system.
|
||||
Import the `system` package:
|
||||
|
||||
```js
|
||||
import "system"
|
||||
```
|
||||
|
||||
{{< children type="functions" show="pages" >}}
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: system.time() function
|
||||
description: The `system.time()` function returns the current system time.
|
||||
aliases:
|
||||
- /v2.0/reference/flux/functions/misc/systemtime
|
||||
- /v2.0/reference/flux/functions/built-in/misc/systemtime
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: system.time
|
||||
parent: System
|
||||
weight: 401
|
||||
---
|
||||
|
||||
The `system.time()` function returns the current system time.
|
||||
|
||||
_**Function type:** Date/Time_
|
||||
_**Output data type:** Timestamp_
|
||||
|
||||
```js
|
||||
import "system"
|
||||
|
||||
system.time()
|
||||
```
|
||||
|
||||
## Examples
|
||||
```js
|
||||
import "system"
|
||||
|
||||
data
|
||||
|> set(key: "processed_at", value: string(v: system.time() ))
|
||||
```
|
Loading…
Reference in New Issue