Strange time_zone behavior with date histogram facet

I'm a little confused by the behavior of a date_histogram. My
understanding from the documentation
(http://www.elasticsearch.org/guide/reference/api/search/facets/date-histogram-facet.html)
is that a when providing a "time_zone" in the facet ElasticSearch will
adjust the "time" returned for each bucket to be milliseconds from epoch in
the specified "time_zone" (defaulting to UTC). But when I test this out as
shown in this gist: https://gist.github.com/1510658 it doesn't seem to be
adjusting the returned "time"s at all.

Do I need to set up a mapping of some kind on the index to tell it that the
times are in UTC, or something?

Also is there a way to change the format of the returned "time"s to be an
ISO format date string?

Heya, yea, something is strange. Trying to track it down with the date
library I use, can you open an issue so we won't loose track of this?

On Thu, Dec 22, 2011 at 5:35 PM, Allan Caffee allan.caffee@gmail.comwrote:

I'm a little confused by the behavior of a date_histogram. My
understanding from the documentation (
Elasticsearch Platform — Find real-time answers at scale | Elastic)
is that a when providing a "time_zone" in the facet Elasticsearch will
adjust the "time" returned for each bucket to be milliseconds from epoch in
the specified "time_zone" (defaulting to UTC). But when I test this out as
shown in this gist: Strange date histogram facet behavior with ElasticSearch version 0.18.5 · GitHub it doesn't seem to be
adjusting the returned "time"s at all.

Do I need to set up a mapping of some kind on the index to tell it that
the times are in UTC, or something?

Also is there a way to change the format of the returned "time"s to be an
ISO format date string?