From 56f8d088c47188b1961beba7482963963d0bb275 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 1 May 2019 14:11:03 -0600 Subject: [PATCH] added system package and move systemTime to system.time --- .../functions/built-in/misc/systemtime.md | 25 --------------- .../reference/flux/functions/system/_index.md | 22 +++++++++++++ .../reference/flux/functions/system/time.md | 31 +++++++++++++++++++ 3 files changed, 53 insertions(+), 25 deletions(-) delete mode 100644 content/v2.0/reference/flux/functions/built-in/misc/systemtime.md create mode 100644 content/v2.0/reference/flux/functions/system/_index.md create mode 100644 content/v2.0/reference/flux/functions/system/time.md diff --git a/content/v2.0/reference/flux/functions/built-in/misc/systemtime.md b/content/v2.0/reference/flux/functions/built-in/misc/systemtime.md deleted file mode 100644 index a7eae6930..000000000 --- a/content/v2.0/reference/flux/functions/built-in/misc/systemtime.md +++ /dev/null @@ -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) -``` diff --git a/content/v2.0/reference/flux/functions/system/_index.md b/content/v2.0/reference/flux/functions/system/_index.md new file mode 100644 index 000000000..86db2f881 --- /dev/null +++ b/content/v2.0/reference/flux/functions/system/_index.md @@ -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" >}} diff --git a/content/v2.0/reference/flux/functions/system/time.md b/content/v2.0/reference/flux/functions/system/time.md new file mode 100644 index 000000000..a75dcbbfc --- /dev/null +++ b/content/v2.0/reference/flux/functions/system/time.md @@ -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() ) +```