Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalTimezone and FixedOffset are no longer useful #67

Closed
Tracked by #630
sampsyo opened this issue Oct 3, 2012 · 2 comments · Fixed by #639
Closed
Tracked by #630

LocalTimezone and FixedOffset are no longer useful #67

sampsyo opened this issue Oct 3, 2012 · 2 comments · Fixed by #639

Comments

@sampsyo
Copy link

sampsyo commented Oct 3, 2012

The icalendar.prop provides a couple of subclasses of datetime.tzinfo called LocalTimezone and FixedOffset. These made sense with the "old" version of this module, but now, since all tzinfo arguments must come from pytz, these classes no longer work. Using them causes an error like this:

...
  event.add('dtstart', date)
File ".../icalendar/cal.py", line 296, in add
  tzid = value.tzinfo.zone
AttributeError: 'LocalTimezone' object has no attribute 'zone'

So these classes should probably either be removed or updated to inherit from the pytz class.

@thet
Copy link
Member

thet commented Jan 30, 2013

@sampsyo i guess, i gonna remove the code.
did you somehow rely on the old timezone behavior?
related: #44

@sampsyo
Copy link
Author

sampsyo commented Jan 30, 2013

I agree—remove the code. No, I don't have anything that depends on it; I was just writing a new app and got confused when they didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants