[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/PluginIndexes/dtml/browseIndex.dtml
Fix DateIndex date display;
unpack stored integers into something meaningful. This fixes
Collector #2316.
Martijn Pieters
mj at zopatista.com
Fri Apr 27 04:35:27 EDT 2007
Log message for revision 74848:
Fix DateIndex date display; unpack stored integers into something meaningful. This fixes Collector #2316.
Changed:
U Zope/trunk/lib/python/Products/PluginIndexes/dtml/browseIndex.dtml
-=-
Modified: Zope/trunk/lib/python/Products/PluginIndexes/dtml/browseIndex.dtml
===================================================================
--- Zope/trunk/lib/python/Products/PluginIndexes/dtml/browseIndex.dtml 2007-04-27 05:19:55 UTC (rev 74847)
+++ Zope/trunk/lib/python/Products/PluginIndexes/dtml/browseIndex.dtml 2007-04-27 08:35:26 UTC (rev 74848)
@@ -27,7 +27,16 @@
<tr>
<td>
<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-sequence-key;
</dtml-if>
More information about the Zope-Checkins
mailing list