added system package and move systemTime to system.time

pull/207/head
Scott Anderson 2019-05-01 14:11:03 -06:00
parent ee2d89407a
commit 56f8d088c4
3 changed files with 53 additions and 25 deletions

View File

@ -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() |> timeShift(duration: offset)
```

View File

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

View File

@ -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: system.time() )
```