On Jun 16, 2005, at 5:16 , Andi Vajda wrote:
After your next 'svn update', please run 'make pyicu' or 'make
install'.
Then you should be able to store time zones into the repository (in
addition to already being able to store datetime and time instances
with a time zone).
Time zone objects supported by the repository are instances of
PyICU.ICUtzinfo, a subclass of Python's datetime.tzinfo class that
wraps an ICU TimeZone instance. Such an object can of course be
used with Python's datetime and time objects.
...
There was some discussion of this the other day on IRC, but it wasn't
clear to me what we'd decided about using a Type or a Kind to store
timezones in the repository.
1. Andi's implementation has a TimeZone type, that serializes itself
by writing its ICU timezone ID out to the repository.
2. Jeffrey H. mentioned wanting to do a timezone Kind for iCalendar
import.
#1's downside is that more general timezones (in particular, the ones
specified by an iCalendar VTIMEZONE) can't be represented.
Presumably, the scheme could be extended (by subclassing PyICU's
TimeZone object, and figuring out how to serialize it).
However, that seems somewhat complex to me, so maybe #2 is better.
We'd have to do some work to match VTIMEZONEs to ICU's timezones
(since that would help with picking up correct translations, and
correct date/time/calendar calculations).
What do people think?
--Grant
Grant Baillie
Open Source Applications Foundation
http://www.osafoundation.org
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev