On 5/6/2009 4:02 AM, Graham Dumpleton wrote: > > > On May 6, 4:38 am, George Song <[email protected]> wrote: >> On 5/5/2009 6:48 AM, Michel Thadeu Sabchuk wrote: >> >> >> >>> Hi guys, >>> I'm having a weird problem with TIME_ZONE settings. Some view list >>> objects based on the time, future time objects are not shown. >>> The problem is that sometimes all objects that need to be shown appear >>> normally, sometimes the latest objects are not shown. >>> Digging on the problem I found that sometimes my os.environ['TZ'] are >>> set to 'America/Sao_Paulo' (the correct one) and sometimes it is the >>> default 'America/Chicago'. I can't see any reason to this problem. >>> I using python2.5 with django1.1-beta installed on a vps with ubuntu >>> hardy. My django settings module have the following line: >>> TIME_ZONE = 'America/Sao_Paulo' >>> And my apache virtual host configuration has the following: >>> <Location /> >>> SetHandler python-program >>> PythonPath "['/path-to-my-project/'] + sys.path" >>> PythonHandler django.core.handlers.modpython >>> SetEnv DJANGO_SETTINGS_MODULE portal.settings >>> PythonDebug Off >>> </Location> >>> Does someone facing the same problem? Does anyone has a suggestion? >> That is very odd indeed. Are there other Django instances within the >> same virtual host? > > It doesn't strictly have to be other Django instances, it can be PHP > or mod_perl as well. Basically anything that runs embedded in Apache > processes and which expects a different timezone setting. > > For case where only running Python applications, for mod_wsgi this > problem is described in: > > > http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone_and_Locale_Settings > > Same thing with mod_python, but with mod_python no way around it.
With mod_python, can you just use multiple interpreters? <http://www.modpython.org/live/mod_python-3.2.5b/doc-html/pyapi-interps.html> -- George --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

