[Checkins] SVN: Products.ZCatalog/trunk/ LP #727981: Fix DateIndex ZMI browsing for dates in the first month of a year.
Hano Schlichting
cvs-admin at zope.org
Sat Jun 2 15:15:31 UTC 2012
Log message for revision 126556:
LP #727981: Fix DateIndex ZMI browsing for dates in the first month of a year.
Changed:
U Products.ZCatalog/trunk/CHANGES.txt
U Products.ZCatalog/trunk/src/Products/PluginIndexes/dtml/browseIndex.dtml
-=-
Modified: Products.ZCatalog/trunk/CHANGES.txt
===================================================================
--- Products.ZCatalog/trunk/CHANGES.txt 2012-06-02 15:10:30 UTC (rev 126555)
+++ Products.ZCatalog/trunk/CHANGES.txt 2012-06-02 15:15:27 UTC (rev 126556)
@@ -4,6 +4,9 @@
3.0a3 (unreleased)
------------------
+- LP #727981: Fix DateIndex ZMI browsing for dates in the first month of a
+ year.
+
- Unify Unindex and DateIndex search logic (`_apply_index`) adding `not`
support to DateIndexes.
Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/dtml/browseIndex.dtml
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/dtml/browseIndex.dtml 2012-06-02 15:10:30 UTC (rev 126555)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/dtml/browseIndex.dtml 2012-06-02 15:15:27 UTC (rev 126556)
@@ -31,11 +31,11 @@
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,
+ <dtml-var "DateTime(((_['sequence-key'] - 44640) / 535680),
+ ((_['sequence-key'] - 1440) / 44640 ) % 12 or 12,
+ (_['sequence-key'] / 1440 ) % 31 or 31,
+ (_['sequence-key'] / 60 ) % 24,
+ (_['sequence-key'] ) % 60,
0, 'UTC')">
<dtml-else>
&dtml-sequence-key;
More information about the checkins
mailing list