# Issue with Log4J @timestamp format

**URL:** <https://discuss.elastic.co/t/issue-with-log4j-timestamp-format/322088>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 28, 2022, 11:09am UTC](https://discuss.elastic.co/t/issue-with-log4j-timestamp-format/322088 "2022-12-28T11:09:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincent2mots](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent2mots/32/55226_2.png) [@vincent2mots](https://discuss.elastic.co/u/vincent2mots)\
**Post date:** [December 28, 2022, 11:09am UTC](https://discuss.elastic.co/t/issue-with-log4j-timestamp-format/322088/1 "2022-12-28T11:09:16Z")

</div>

Hello there!

I'm trying to ship log files from Filebeat into Logstash but I got an issue with @timestamp format

**Here is one example of line Filebeat read from the file :**

```auto
{"@timestamp":"2022-12-28T01:03:16,911Z","hostName":"host1",...}

```

You notice there is a comma between the second and the millisecond : 16 **,** 911Z

**Here is the configuration of filebeat.yml :**

```auto
- type: log
  enabled: true
  paths:
    - c:\data\ds\*.log*
  json.keys_under_root: true
  json.overwrite_keys: true
  json.add_error_key: true
  json.expand_keys: true
  fields_under_root: true

```

**And the error I got :**

```auto
[jsonhelper] jsontransform/jsonhelper.go:55 JSON: Won't overwrite @timestamp because of parsing error: parsing time "2022-12-28T01:03:16,911Z" as "2006-01-02T15:04:05Z07:00": cannot parse ",911Z" as "Z07:00"

```

How to get rid of it? If I can't explain to Filebeat how to convert timestamp, is it possible to tell him to change the field name from @timestamp to something else?

Best regards,

---

<div class="post-metadata">

**Author:** ![vincent2mots](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent2mots/32/55226_2.png) [@vincent2mots](https://discuss.elastic.co/u/vincent2mots)\
**Post date:** [January 4, 2023, 7:49am UTC](https://discuss.elastic.co/t/issue-with-log4j-timestamp-format/322088/2 "2023-01-04T07:49:17Z")

</div>

No idea? 😅

---

<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:** [February 1, 2023, 9:49am UTC](https://discuss.elastic.co/t/issue-with-log4j-timestamp-format/322088/3 "2023-02-01T09:49:38Z")

</div>

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