Graylog2 / Graylog2/graylog2-server

Incoherency in parse_date function documentation

Open
#5,006 1 comment 0 reactions 0 assignees View on GitHub
bug documentation triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

In Graylog 2.4 [functions documentation](http://docs.graylog.org/en/2.4/pages/pipelines/functions.html), there is incoherent information about `parse_date` function optional arguments order.

Under Overview, there is an example where `timezone` is the third parameter.
```
let new_date = parse_date(
to_string($message.transaction_date),
"yyyy-MM-dd HH:mm:ss",
to_string($message.transaction_timezone)
);
```

However, `parse_date` function reference shows that the `timezone` parameter is the *fourth* parameter
```
parse_date(value: string, pattern: string, [locale: string], [timezone: string])
```

It seems that `locale` parameter has been added in Graylog version 2.3 but the examples under Overview have not been updated accordingly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.