Re: PLONE_CEILING for date fields

Cédric Messiant <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Organization Ecréall
Message-ID <20131114172810.33023f5c@ocema>
Le Wed, 13 Nov 2013 10:05:17 -0800,
"David Glick (Plone)" <[email protected]> a écrit :

> On 11/12/13, 11:10 PM, Cédric Messiant wrote:
> > Hi,
> >
> > In plone.app.form.widgets datecomponents.py and Products.CMFPlone's
> > date_components_support.py, we have :
> >
> > # from CMFDefault.DublinCore
> > CEILING = DateTime(9999, 0)
> > FLOOR = DateTime(1970, 0)
> > PLONE_CEILING = DateTime(2021, 0)  # 2020-12-31
> >
> > And later :
> >
> > # Anything above PLONE_CEILING should be PLONE_CEILING
> > if date.greaterThan(PLONE_CEILING):
> >      date = PLONE_CEILING
> >
> > The resulting issue is as follows : in our Plone site, we have some
> > dates which are greater than 2021. In view, the date
> > is correct but in edit mode, it is changed to 12/31/2020 by Plone.
> >
> > In Products.CMFDefault's DublinCore.py, the only "ceiling" that I
> > found is : __CEILING_DATE = DateTime( 2500, 0 ) on line 304.
> >
> > Does anyone know why we have this ceiling ? Should we change
> > it to 2500 in Products.CMFPlone and plone.app.form ?
> >
> Probably. Does that work? Does it break any tests?


It works, I added some tests and pushed my changes in plone.app.form
2.2.x branch and Products.CMFPlone 4.3.x branch.

Cédric

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Plone-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.