Time
Time (time)
Section titled “Time (time)”Time processing: parsing and formatting time values.
Transform json
Minimal example
Section titled “Minimal example”actions: - time: {}JSON
{ "actions": [ { "time": {} } ]}Contents
Section titled “Contents”A ✓ marks a field that accepts a context variable such as
{{ VARIABLE }}.
Fields
Section titled “Fields”| Field | Type | Required | Description |
|---|---|---|---|
description |
string |
describe this step. | |
condition |
lua-expression (string) |
Only run this action if the specified condition is met. Examples: 2 * count() |
|
input-field |
field (string) |
Field that provides an input time. If not provided, use current time. Examples: data_field |
|
output-field |
field (string) |
Field to contain time as a string. Examples: data_field |
|
input-timezone |
string |
If input is provided, this is its timezone. | |
output-timezone |
iana-timezone (string) |
Timezone for output time. Examples: UTC, CAT |
|
input-format |
time-format (string) |
Time format for input time, if provided. | |
input-formats |
string[] |
Multiple input time formats which will be tried in turn for conversion. | |
output-format |
time-format (string) |
Time Format for output time. Default is “%Y-%m-%dT%H:%M:%S%.3fZ”. | |
time-range-conditions |
Time Range Conditions |
Describe how special time ranges are interpreted. | |
local |
Local |
Treat the following fields as using the local timezone, if none are specified the utc timezone is assumed. Default: utcAllowed values: input, output, both, utc |
|
delta |
Delta |
Add or subtracts specified amount of time to the timestamp (now is used if input-field is not specified).Allowed values: add-time, subtract-time |
|
zero-time ✓ |
boolean (bool) |
Set the time component of the output time to 00:00:00.000. Default: false |
|
suppress-warnings ✓ |
boolean (bool) |
Suppress warnings generated by this action. Default: false |
Schema
Section titled “Schema”- Delta Options
- Time Range Conditions - Time Range Output Fields
- Time Range Conditions Fields
- Local Options
Delta Options
Section titled “Delta Options”| Option | Name | Type | Description |
|---|---|---|---|
add-time |
Add Time | string |
Field containing the start of the current window. |
subtract-time |
Subtract Time | string |
Field containing length of the window. |
Time Range Conditions - Time Range Output Fields
Section titled “Time Range Conditions - Time Range Output Fields”| Field | Type | Required | Description |
|---|---|---|---|
start-field |
field (string) |
✅ | Field containing the start of the current window. Examples: data_field |
length-field |
field (string) |
✅ | Field containing length of the window. Examples: data_field |
Time Range Conditions Fields
Section titled “Time Range Conditions Fields”| Field | Type | Required | Description |
|---|---|---|---|
times |
string[] |
✅ | |
output-fields |
map (object) |
||
time-range-output |
Time Range Output |
Local Options
Section titled “Local Options”| Value | Aliases | Name | Description |
|---|---|---|---|
input |
input | ||
output |
output | ||
both |
both | ||
utc |
utc |