[Zope] Menu of Timezones
John Wheeler
jdw27_42@hotmail.com
Thu, 14 Feb 2002 22:16:40
For an input form, I'd like to make a menu of time zones.
I saw in Appendix B: API Reference of the Zope Book that there already is a
DateTime module function that returns a list of timezones, so I thought I
could simply use <dtml-in> to go through the list, wrapping each
sequence-item with <option></option>.
I tried every combination I could think of but got an error every time:
<dtml-in {below}> Error Name Error Value
================= ========== ===========
DateTime.Timezones KeyError DateTime.Timezones
Timezones KeyError Timezones
"_.Timezones()" AttributeError Timezones
"DateTime.Timezones()" NameError global name 'DateTime' is not
defined
"_.DateTime.Timezones()" AttributeError class DateTime has no attribute
'Timezones'
"DateTime[Timezones]" NameError global name 'DateTime' is not
defined
"_.DateTime[Timezones]" NameError global name 'Timezones' is not
defined
"_.DateTime._Timezones()" SyntaxError Line 2: "_Timezones" is an invalid
attribute name because it starts with "_".
I even tried writing a python method using "from DateTime import Timezones"
but got an ImportError: import of "Timezones" from "DateTime" is
unauthorized.
Is it just not possible to access Timezones() through the web? If I'd have
to go to an external method, I'll just hardcode the timezones into the DTML
method by hand.
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx