Skip to content

Commit

Permalink
LP #727981: Fix DateIndex ZMI browsing for dates in the first month o…
Browse files Browse the repository at this point in the history
…f a year.
  • Loading branch information
hannosch committed Jun 2, 2012
1 parent 5fc6e70 commit 2b36014
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,9 @@ Changelog
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.

Expand Down
10 changes: 5 additions & 5 deletions src/Products/PluginIndexes/dtml/browseIndex.dtml
Expand Up @@ -31,11 +31,11 @@ The index "&dtml-getId;" contains <dtml-var items fmt=collection-length thousand
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;
Expand Down

3 comments on commit 2b36014

@djowett
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to port this fix to the v2.13 series? Or am I safe to use v3.0+ in Plone?

@hannosch
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djowett ZCatalog 3.0 should work fine with recent versions of Plone (4.1+). I asked the framework team to consider including it, but nobody stepped up to shepherd the PLIP for it.

@djowett
Copy link

@djowett djowett commented on 2b36014 Jul 18, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.