Zope fans, I have just done a line-by-line audit of DateTime.py. There were a number of issues, some of which have been submitted to the collector. I have corrected everything I could find. Gregor Hoffleit recently submitted a patch for DateTime.py as well. He made some of the same corrections I did, though in a different way. The major changes are: - Usage of integer arithmetic where possible to eliminate rounding errors. - Better support for daylight savings time. - Usage of long integer milliseconds, making it possible to do date comparisons with more predictable results. - Date comparisons are now time zone independent, meaning that a DateTime set to 3:00 PM in GMT-5 is equivalent to a DateTime set to 4:00 PM in GMT-4. If do any work with Zope's DateTime or have had any issues with it, please install this patch so it can be fully tested. I have already tested it to the best of my ability. I expect this to become part of the main distribution once it has been tested. http://www.zope.org/Members/hathawsh/DateTime.py There is one change made by Gregor which I feel I could not incorporate. Gregor added the "CET" and "CEST" time zones to the list of recognized time zones. Rather than add it now, I would prefer to get a complete list of zones which are not included (EDT, which happens to be the time zone I am in right now, is also missing.) For now, those zones should be correctly translated to GMT offsets. On a slightly different note: Recently there was a thread that described a problem with the time format of Z2.log. That problem is unrelated to DateTime.py. ZServer/medusa/http_server is written incorrectly; where it accesses gmtime() it ought to be calling localtime(). Also, it needs to be updated for daylight savings time the same way DateTime was. Shane
participants (1)
-
Shane Hathaway