[Vobject] Timezone Problems -- PLEASE HELP!
Keyton Weissinger
keyton at gmail.com
Fri Aug 28 22:30:34 CDT 2009
Hi Jeffrey!
Thanks VERY much for taking time to help me. Seeing it in black-and-white I
see the problem now. Thank you.
That said, I have already taken your advice on moving to PyTZ. I just needed
more capability than the python.org example TZInfo gave me.
In any event, thank you very much for taking time. I really appreciate it.
And thanks again for this very valuable library!
I'm pretty new to the world of iCalendar. Quick question for you:
Can I use VObject to create the contents of a meeting-request email that
would could be sent to an Outlook or Google Calendar user? I assume so but
haven't gotten to that yet.
By the way, my site Schoolicity (a school management site that just recently
went live -- https://www.schoolicity.com) makes extensive use of your
library (for its calendar sync feature, mostly). If you're looking for
endorsements, feel free to add me to the list.
Take care,
Keyton
On Fri, Aug 28, 2009 at 11:12 PM, Jeffrey Harris
<jeffrey at osafoundation.org>wrote:
> Hi Keyton,
>
> > First and foremost, thank you for sharing your VObject library with the
> > world. It's a very nice way to handle these issues and I really
> > appreciate its use.
>
> Thanks! Err, I mean you're welcome ;)
>
> > The tzinfo class I'm using is the USTimeZone class from the Python site
> > (http://docs.python.org/library/datetime.html#tzinfo-objects).
>
> This was a head-scratcher for me, so I stepped through it and figured
> out what's happening.
>
> You need to remove the first part of the dst() method, the part that says:
>
> if dt is None or dt.tzinfo is None:
> # An exception may be sensible here, in one or both cases.
> # It depends on how you want to treat them. The default
> # fromutc() implementation (called by the default astimezone()
> # implementation) passes a datetime with dt.tzinfo is self.
> return ZERO
>
> This was a really silly thing for them to include in the example.
> There's no requirement in the actual documentation that dst be handed
> something whose tzinfo class matches the original, and vobject's tzinfo
> -> VTIMEZONE mechanism is currently handing naive datetimes to the
> tzinfo class for testing.
>
> Since the official example lists this code, vobject should fix this,
> since I'm sure you won't be the last to use that example (as an aside,
> I'd recommend using PyTZ or something like it, rather than that sample
> code). For now, though, just remove that counter-productive test and
> you should be off and running...
>
> Sincerely,
> Jeffrey
>
> _______________________________________________
> VObject mailing list
> VObject at lists.skyhouseconsulting.com
> http://lists.skyhouseconsulting.com/mailman/listinfo/vobject
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.skyhouseconsulting.com/pipermail/vobject/attachments/20090828/41765587/attachment.htm
More information about the VObject
mailing list