Correct but misleading documentation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytz |
Fix Released
|
Undecided
|
Stuart Bishop |
Bug Description
The documentation gives the following example:
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=
'2002-10-27 12:00:00 LMT+0020'
The problem is that I was working on a difficult project for which I needed time zone support, so I quickly skimmed through the example code, found the line above, and then happily imported it into my program.
I am sure that I am not the only one who got caught by this. One prominent example is a recent blog entry *which specifically talks about time zones* and only quotes the incorrect way of doing things (https:/
So, I strongly suggest that the documentation contains *a clear warning* around the example that should *not* be followed (bold, special paragraph type,…).
Changed in pytz: | |
status: | New → Fix Committed |
assignee: | nobody → Stuart Bishop (stub) |
Changed in pytz: | |
status: | Fix Committed → Fix Released |