Commit 64e56e38 authored by Tres Seaver's avatar Tres Seaver

Backport ClientForm and mechanize externals fixes from trunk.

Backport DateTime test fixes from trunk (due to updated pytz).
parent beba9373
......@@ -8,6 +8,11 @@ Zope Changes
Bugs Fixed
- Updated 'pytz' from '2007f' to '2008i'.
- Moved svn:externals for 'mechanize', 'ClientPath', and 'pytz' to
versions managed outside the Zope3 trunk.
- Launchpad #174705: ensure that the error info object exposed to a
'tal:on_error' handler has attributes visible to restricted code.
......
......@@ -1848,5 +1848,5 @@ class strftimeFormatter:
# Module methods
def Timezones():
"""Return the list of recognized timezone names"""
return list(PytzCache._zlst)
return sorted(list(PytzCache._zmap.values()))
......@@ -11,9 +11,15 @@ Function Timezones()
Returns the list of recognized timezone names:
>>> from DateTime import Timezones
>>> Timezones() # doctest: +ELLIPSIS
[...'Brazil/Acre'... 'Brazil/DeNoronha'... 'IDLE'... 'NZST'...]
>>> zones = set(Timezones())
Almost all of the standard pytz timezones are included, with the exception
of some commonly-used but ambiguous abbreviations, where historical Zope
usage conflicts with the name used by pytz:
>>> import pytz
>>> [x for x in pytz.all_timezones if x not in zones]
['CET', 'EET', 'EST', 'MET', 'MST', 'WET']
Class DateTime
==============
......
......@@ -132,7 +132,7 @@ The _zidx attribute is a list of lower-case and possibly abbreviated
time zone names that can be mapped to offical zone names.
>>> cache._zidx #doctest: +ELLIPSIS
['australia/yancowinna'... 'gmt+0500'... 'europe/isle_of_man'...]
[... 'australia/yancowinna'... 'gmt+0500'... 'europe/isle_of_man'...]
Note that there are more items in _zidx than in _zlst since there are
multiple names for some time zones.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment