# Using timestamp processor fails

**URL:** <https://discuss.elastic.co/t/using-timestamp-processor-fails/228348>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 16, 2020, 2:57pm UTC](https://discuss.elastic.co/t/using-timestamp-processor-fails/228348 "2020-04-16T14:57:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![willyaranda\_vonage](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willyaranda_vonage/32/47191_2.png) [@willyaranda\_vonage](https://discuss.elastic.co/u/willyaranda_vonage)\
**Post date:** [April 16, 2020, 2:57pm UTC](https://discuss.elastic.co/t/using-timestamp-processor-fails/228348/1 "2020-04-16T14:57:03Z")

</div>

Hi,

I have logs that are JSON, and I'm trying to set the @timestamp field based on that.

The format is:

2020-04-16 05:45:51,913

with timezone as 'America/Los\_Angeles'

I have set this configuration

```
processors:
- timestamp:
    field: event_date_pst
    timezone: 'America/Los_Angeles'
    layouts:
      - '2006-01-02 15:04:05,000'
    test:
      - '2020-04-16 05:45:51,913'
      - '2020-04-30 20:45:52,000'
      - '2020-12-31 20:45:52,080'

```

but when testing it, fails:

```
filebeat -e -d "*" test config
 
2020-04-16T07:47:17.381-0700	DEBUG	[processor.timestamp]	timestamp/timestamp.go:173	Failure parsing time field.	{"error": "failed parsing time field event_date_pst='2020-04-16 05:45:51,913'", "errorCauses": [{"error": "failed using layout [2006-01-02 15:04:05,000] cannot parse [913] as [,000]"}]}

```

The thing is that if I change the comma by a dot in the layout and the tests, it works, but it does not with the comma.

Am I missing something? or it is because this?

> <https://github.com/golang/go/issues/6189>
>
> by dmitri.m:
> What steps will reproduce the problem?
> If possible, include a link to a program on play.golang.org.
> The Go time package expects the...

Thanks!

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [April 17, 2020, 12:56pm UTC](https://discuss.elastic.co/t/using-timestamp-processor-fails/228348/2 "2020-04-17T12:56:49Z")

</div>

You didn't miss anything, this is a confirmed, known issue: [https://github.com/elastic/beats/issues/15012](https://github.com/elastic/beats/issues/15012)

Go accepts milliseconds only with "." (dot).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 15, 2020, 12:56pm UTC](https://discuss.elastic.co/t/using-timestamp-processor-fails/228348/3 "2020-05-15T12:56:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
