Marklogic计算了桶和UTC时区

时间:2016-07-11 17:18:56

标签: marklogic marklogic-8

我有一个计算桶如下

<computed-bucket name="older"  lt="-P1Y" anchor="start-of-year">Older</computed-bucket>
<computed-bucket lt="P1Y" ge="P0Y" anchor="start-of-year" name="thisyear">This Year</computed-bucket>
<computed-bucket lt="P1M" ge="P0M" anchor="start-of-month" name="thismonth">This Month</computed-bucket>
<computed-bucket lt="-P1D" ge="-P15D" anchor="start-of-day" name="twoweeks">Last 2 Weeks</computed-bucket>
<computed-bucket lt="P0D" ge="-P1D" anchor="start-of-day" name="yesterday">Yesterday</computed-bucket>
<computed-bucket lt="P1D" ge="P0D" anchor="start-of-day" name="today">Today</computed-bucket>

我的数据库中有文档,时区也是ISO格式.ML中的桶是否会根据UTC计算?如果是这样,我可以强制计算不同时区的存储桶吗?

1 个答案:

答案 0 :(得分:3)

The buckets will be based on the timezone of the host. If you can't configure the host to be in the desired timezone, you could calculate offsets and apply them to your anchors; however, I think the dynamic anchors (start-of-day, start-of-month, ...) are tied to the current time of the host.