Solve the problem of 8 hours time zone difference

Output per day to elasticsearch index, because use utc, from 8:00 to create index on the same day, every day while before 8:00 data output to the yesterday's index, the configuration is as follows

output {
  elasticsearch {
    host => "sea2"
    index => "soa_logs-%{+YYYY.MM.dd}"
  }
}
Because the time zone problem will index at 8:00 to create

drwxrwxr-x 8 hadoop hadoop 4096 Sep 17 08:00 soa_logs-2014.09.17
drwxrwxr-x 8 hadoop hadoop 4096 Sep 18 08:00 soa_logs-2014.09.18
drwxrwxr-x 8 hadoop hadoop 4096 Sep 19 08:00 soa_logs-2014.09.19
drwxrwxr-x 8 hadoop hadoop 4096 Sep 20 08:00 soa_logs-2014.09.20
drwxrwxr-x 8 hadoop hadoop 4096 Sep 21 08:00 soa_logs-2014.09.21

Check the joda source code, a DateTimeZone have access to the system default time zone method. GetDefault ()
The solution：
WithZone (org. Joda. Time. DateTimeZone: : UTC)
Modified to
WithZone (org. Joda. Time. DateTimeZone. GetDefault ())