Time
Time processes values by converting time values between formats.
Interpretation Methods
The processor supports these interpretation methods:
- object
- data
Options
| Field | Type | Description | Required |
|---|---|---|---|
| format | string | the time format of the data. must be one of: - pattern-based layouts - unix: epoch (supports fractions of a second) - unix_milli: epoch milliseconds - now: current time | Yes |
| set_format | string | the time format of the processed data. must be one of: - pattern-based layouts - unix: epoch (supports fractions of a second) - unix_milli: epoch milliseconds | Yes |
| location | string | the timezone abbreviation of the data. defaults to UTC. | No |
| set_location | string | the timezone abbreviation of the processed data. defaults to UTC. | No |
Use Cases
Converting Epoch to Pattern-Based Layout
If the format is unix and the set_format is 2006-01-02T15:04:05Z, then the result is:
{"a":1639877490}
{"a":"2021-12-19T01:31:30Z"}
Converting Between Time Zones
If the location is America/Los_Angeles and the set_location is America/New_York, then the result is:
{"a":"2020-Jan-29 Wednesday 00:19:25"}
{"a":"2020-Jan-29 Wednesday 03:19:25"}
Updated over 2 years ago
