On 9/7/05, Stuart Bishop <[EMAIL PROTECTED]> wrote: > There is an issue if timezone definitions change. So for instance, if you > pickled a datetime instance for 13:00 1st April 2007 US/Eastern with version > 2005k of pytz, if you unpickled it using version 2005m of pytz it would > still think it was 13:00 1st April 2007 EST. If you then converted it to UTC > and back to US/Eastern (such as done by pytz's normalize() method), you > would end up with 14:00 1st April 2007 EDT. This is correct or crap > depending on what sort of applications you write :)
This suggests to me that timezones should always go through a name lookup when unpickling. That doesn't avoid all problems (e.g., use a timezone database that doesn't handle a future rule, convert an affected date to UTC, update to a new version of the database, and convert back to the original timezone), but there's a limit to what can be done. If timezones are always pickled as name references, that would avoid freezing broken rules into the database, at least. -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> Zope Corporation _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com