thread safety fix for buildElasticSearchTimeFormat

from #6