[prev in list] [next in list] [prev in thread] [next in thread]
List: zope-cmf
Subject: [Zope-CMF] CMFDefault skins: no timezone?
From: Paul Winkler <pw_lists () slinkp ! com>
Date: 2005-01-31 5:45:57
Message-ID: 20050131054557.GA3908 () slinkp ! com
[Download RAW message or body]
Hiya,
I wanted to ask for discussion of this before submitting a collector
item. The Dublin Core definitions at
http://dublincore.org/documents/dcmi-terms/ state that
"modified" should be in ISO format YYYY-MM-DD, and don't
say anything about timezone.
But there's a problem with the way this is implemented in CMFDefault.
What happens when you use the import/export system (or ZSyncer) to
copy ZODB objects from one server to another in a different timezone?
It turns out that the result looks "wrong".
Example:
Server A is running in US/Eastern.
On server A, object FooDoc was modified at 13:00:00 US/Eastern.
Server B is running in GMT.
On server B, object BarDoc was modified at 13:00:00 GMT.
Note that BarDoc is five hours older than FooDoc.
Now we export FooDoc from A and import it into B,
in the same folder as BarDoc.
folder_contents shows them both modified at 13:00:00 which,
in the absence of timezone information, is certainly misleading.
My opinion is that we should do the Right Thing, by which I mean
to show the user times that can be judged against each other
correctly regardless of where the object originates.
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.
- 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())
Opinions?
If the consensus is that this is Not A Problem, I'm ok with hacking
ZSyncer to attempt to fix timezone on CMF content after import.
But that feels ... well, hacky.
--
Paul Winkler
http://www.slinkp.com
_______________________________________________
Zope-CMF maillist - Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic