[Zope-CMF] Re: CMFDefault skins: no timezone?

yuppie y.2005- at wcm-solutions.de
Mon Jan 31 07:25:24 EST 2005


Hi Paul!


Paul Winkler wrote:
> 
> I can think of a couple ways to do this:
> 
> 1) In DublinCore, change ModificationDate() to convert to
> the local timezone before calling ISO().  Example:
> 
>     def ModificationDate( self ):
>         """ Dublin Core Date element - date resource last modified.
>         """
>         zone = DateTime().timezone()
>         modified = self.modified().toZone(zone)
>         return modified.ISO()
> 
> I've tested this, it works.
> For consistency, I suppose we should do the same
> with Date, CreationDate, ExpirationDate, and EffectiveDate. 

+1

> - OR -
> 
> 2) change ModificationDate() et al. to include timezone
> information.  Example:
> 
>     def ModificationDate( self ):
>         """ Dublin Core Date element - date resource last modified.
>         """
>         modified = self.modified()
>         return '%s %s' % (modified.ISO(), modified.timezone()) 

-1

DublinCore interface methods like ModificationDate are widely used for 
presentation, so including timezone information would break some layouts.

See http://zope.org/Collectors/CMF/60 for a related issue.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list