Ticket #9857 (assigned Bug)
Not being able to determine timezone causes opaque errors in indexing
| Reported by: | MatthewWilkes | Owned by: | MatthewWilkes |
|---|---|---|---|
| Priority: | minor | Milestone: | 4.x |
| Component: | Infrastructure | Keywords: | |
| Cc: | bibek |
Description (last modified by MatthewWilkes) (diff)
There has been a report of Debian (Lenny) and Ubuntu (9.04) installations failing due to KeyError in DateTime.DateTime.toZone
This is because if the python install can't pick up a timezone other than an empty string. DateTime fails at looking up the timezone in its data structures. This causes indexing of CreationDate to fail, which happens on front-page of new sites, meaning that users cannot add Plone sites.
A work-around is setting the TZ environment variable, but we could really do with a more helpful error message, so that users know what to look for.
Change History
comment:1 Changed 2 years ago by MatthewWilkes
- Status changed from new to assigned
- Owner set to MatthewWilkes
comment:2 Changed 2 years ago by kleist
I cannot decode this sentence above:
"This is because if the python install can't pick up a timezone other than DateTime fails at looking up the timezone in its data structures."
I guess that a word has been lost? Note the transition to italics...
comment:4 Changed 2 years ago by bibek
- Cc bibek added
Lennart Regebro says, "there is no way to reliably determine the timezone on a machine. So it's done unreliably, and sometimes fails."
I've written about my experience with this problem and the fix suggested by MatthweWikles here: http://bibek.posterous.com/solved-plone-installation-strange-error
Thanks, Bibek
comment:6 Changed 19 months ago by hannosch
- Milestone changed from 4.0 to 4.x
This sounds like we should have a check for a valid timezone and a warning message at startup time. Something like: "The timezone of this machine could not be determined automatically, please specify it using the TZ environment variable. This can be achieved using the 'environment-vars' option of the plone.recipe.zope2instance recipe."
