# Dynamically assigning timezone from a filebeat event

**URL:** https://discuss.elastic.co/t/dynamically-assigning-timezone-from-a-filebeat-event/125669
**Category:** Logstash
**Created:** [March 26, 2018, 7:33pm UTC](https://discuss.elastic.co/t/dynamically-assigning-timezone-from-a-filebeat-event/125669 "2018-03-26T19:33:37Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![rajisankar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajisankar/32/43250_2.png) [@rajisankar](https://discuss.elastic.co/u/rajisankar)
#### Post date: [March 26, 2018, 7:33pm UTC](https://discuss.elastic.co/t/dynamically-assigning-timezone-from-a-filebeat-event/125669/1 "2018-03-26T19:33:37Z")

</div>

I am shipping logs to logstash from filebeat. I have added the processor to add beat.timezone. But, when beat.timezone returns "EDT" (which currently is correct), logstash fails to parse as its unable to identify EDT. in Joda timezone, EDT is referred as EST5EDT. Is there a way to overcome this issue in logstash and parse timezones from filebeat?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [March 26, 2018, 7:47pm UTC](https://discuss.elastic.co/t/dynamically-assigning-timezone-from-a-filebeat-event/125669/2 "2018-03-26T19:47:21Z")

</div>

You could use a translate filter in Logstash to translate EDT values to EST4EDT (or a UTC offset). Sure, you'll have to enumerate all timezone values you'll be using but presumably they're not too many of them.

---

<div class="post-metadata">

### Author: ![rajisankar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajisankar/32/43250_2.png) [@rajisankar](https://discuss.elastic.co/u/rajisankar)
#### Post date: [March 26, 2018, 7:59pm UTC](https://discuss.elastic.co/t/dynamically-assigning-timezone-from-a-filebeat-event/125669/3 "2018-03-26T19:59:53Z")

</div>

Thought about it,but yeah, need to add for all the relevant timezones. Was hoping for a more straightforward solution as EDT is part of ISO.

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [March 27, 2018, 6:46am UTC](https://discuss.elastic.co/t/dynamically-assigning-timezone-from-a-filebeat-event/125669/4 "2018-03-27T06:46:47Z")

</div>

What ISO standard describes EDT?

---

<div class="post-metadata">

### Author: ![rajisankar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajisankar/32/43250_2.png) [@rajisankar](https://discuss.elastic.co/u/rajisankar)
#### Post date: [March 27, 2018, 7:03pm UTC](https://discuss.elastic.co/t/dynamically-assigning-timezone-from-a-filebeat-event/125669/5 "2018-03-27T19:03:52Z")

</div>

My bad. I meant that EDT is an accepted standard timezone specification.

From [https://www.cl.cam.ac.uk/~mgk25/iso-time.html](https://www.cl.cam.ac.uk/~mgk25/iso-time.html) ,  
"There exists no international standard that specifies abbreviations for civil time zones like CET, EST, etc. and sometimes the same abbreviation is even used for two very different time zones. In addition, politicians enjoy modifying the rules for civil time zones, especially for daylight saving times, every few years, so the only really reliable way of describing a local time zone is to specify numerically the difference of local time to UTC. Better use directly UTC as your only time zone where this is possible and then you do not have to worry about time zones and daylight saving time changes at all."

---

<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: [April 24, 2018, 7:04pm UTC](https://discuss.elastic.co/t/dynamically-assigning-timezone-from-a-filebeat-event/125669/6 "2018-04-24T19:04:14Z")

</div>

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