# Multiple timezones in central syslog

**URL:** <https://discuss.elastic.co/t/multiple-timezones-in-central-syslog/39345>\
**Category:** Logstash\
**Created:** [January 15, 2016, 4:09pm UTC](https://discuss.elastic.co/t/multiple-timezones-in-central-syslog/39345 "2016-01-15T16:09:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nnet/32/25982_2.png) [@nnet](https://discuss.elastic.co/u/nnet)\
**Post date:** [January 15, 2016, 4:09pm UTC](https://discuss.elastic.co/t/multiple-timezones-in-central-syslog/39345/1 "2016-01-15T16:09:37Z")

</div>

Hi, my centralized syslog server is in timezone EST, logstash reads /var/log/messages (file input) on this server. Some of the servers sending syslog data are in timezone CST. If I do any searches 1 hour or less old, I do not see any data from the servers in CST.

cat /etc/logstash/conf.d/10-syslog.conf

filter {  
if [type] == "syslog" {  
grok {  
match =\> { "message" =\> "%{SYSLOGTIMESTAMP:syslog\_timestamp} %{SYSLOGHOST:syslog\_hostname} %{DATA:syslog\_program}(?:[%{POSINT:syslog\_pid}])?: %{GREEDYDATA:syslog\_message}" }  
add\_field =\> ["received\_at", "%{@timestamp}"]  
add\_field =\> ["received\_from", "%{host}"]  
}  
syslog\_pri { }  
date {  
match =\> ["syslog\_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]  
}  
}  
}

For messages from CST servers, I see received\_at showing time in EST, and the one hour difference as shown from syslog\_timestamp.

Also using filebeat to send data to above logstash, all its timestamps are in CST.

How can I get the data from CST servers to display as well as the data from EST servers?

---

<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:** [January 17, 2016, 4:49pm UTC](https://discuss.elastic.co/t/multiple-timezones-in-central-syslog/39345/2 "2016-01-17T16:49:38Z")

</div>

Store the local [timezone name](http://joda-time.sourceforge.net/timezones.html) in a field via Filebeat (you'll have to hardcode it into the Filebeat configuration), then reference that field in the date filter:

```auto
date {
  match => ...
  timezone => "%{tz}" # or whatever you call the field
}

```

---

<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:** [July 6, 2017, 5:15am UTC](https://discuss.elastic.co/t/multiple-timezones-in-central-syslog/39345/3 "2017-07-06T05:15:26Z")

</div>

Closed on July 6, 2017, 5:15am UTC


