Commit 0d1d30d4 authored by Martijn Pieters's avatar Martijn Pieters

Fix DateIndex date display; unpack stored integers into something meaningful....

Fix DateIndex date display; unpack stored integers into something meaningful. This fixes Collector #2316.
parent b30a0ba9
...@@ -27,7 +27,16 @@ The index "&dtml-getId;" contains <dtml-var items fmt=collection-length thousand ...@@ -27,7 +27,16 @@ The index "&dtml-getId;" contains <dtml-var items fmt=collection-length thousand
<tr> <tr>
<td> <td>
<dtml-if "meta_type in ('DateIndex',)"> <dtml-if "meta_type in ('DateIndex',)">
<dtml-var "DateTime(_['sequence-key'])"> <dtml-comment><!--
DateIndexes store dates packed into an integer, unpack
into year, month, day, hour and minute, no seconds and UTC.
--></dtml-comment>
<dtml-var "DateTime((_['sequence-key'] / 535680),
(_['sequence-key'] / 44640 ) % 12,
(_['sequence-key'] / 1440 ) % 31,
(_['sequence-key'] / 60 ) % 24,
(_['sequence-key'] ) % 60,
0, 'UTC')">
<dtml-else> <dtml-else>
&dtml-sequence-key; &dtml-sequence-key;
</dtml-if> </dtml-if>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment