[Zope-CMF] Re: Effective Date inconsistencies

Maurits van Rees m.van.rees at zestsoftware.nl
Sat Jun 23 09:00:09 EDT 2007

Wichert Akkerman, on 2007-06-23:
> Previously Wichert Akkerman wrote:
>> Previously Alexander Limi wrote:
>> > Not so:
>> > 
>> > - EffectiveDate returns a *string* 'None' when it has no value (wtf?)
>> That is wrong: it should return 'the time in the system default
>> timezone' as documented in T Products.CMFCore.interfaces.IDublinCore.
> I misread the interface; that only specified what should happen if no
> timezone is given. The interface says that the method should return a
> string which corresponds to the time or None if no time is set. So the
> behaviour you see is expected and can not be changed without breaking
> backwards compatibility.

Where are you reading that?  Products.CMFCore.interfaces.IDublinCore
only has some comments:

# BBB: module will be removed in CMF 2.2
#      zope2 interfaces created on runtime:
#      - DublinCore
#      - CatalogableDublinCore
#      - MutableDublinCore

In zope(.app).dublincore.interfaces I see

class ICMFDublinCore(Interface):
    def EffectiveDate():
        """Return the effective date

        The value of the first Dublin Core `Date` element qualified by
        'effective' is returned as a unicode string if a qualified
        element is defined, otherwise, an empty unicode string is
        returned. The string is formatted  'YYYY-MM-DD H24:MN:SS TZ'.

So: either it returns a nicely formatted string with a date or it
returns an empty string, but not 'None'.

Maurits van Rees | http://maurits.vanrees.org/ [NL]
            Work | http://zestsoftware.nl/
"Do not worry about your difficulties in computers,
 I can assure you mine are still greater."

More information about the Zope-CMF mailing list