TZ environment variable doesn't work when using runzope.py

Bug #501805 reported by Dylan Jay
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Low
Unassigned

Bug Description

Put the following in buildout

[instance]
recipe = plone.recipe.zope2instance
...
environment-vars =
#http://docs.python.org/library/time.html : std offset [dst [offset [,start[/time], end[/time]]]]
   TZ AEST-10AEDT-11,M10.5.0,M3.5.0

Then run

$ bin/instance console

and in a python script run

>>> print DateTime().timezone()
GMT+1100

which is correct.

$ parts/instance/bin/runzope
and in a python script run

>>> print DateTime().timezone()
US/Eastern

which is incorrect.

Revision history for this message
Andreas Jung (ajung) wrote :

Environment variables configured through <environment>...</environment> is also working with runzope.

Revision history for this message
Dylan Jay (t-launchpad-dylanjay-com) wrote :

incorrect. That <environment>...</environment> does not work with runzope when it comes to timezones.

Changed in zope2:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Chris Hamono (chris-hamono) wrote :

I think this only effects CST and EST from timezones other than the US e.g. Australia.

see https://bugs.launchpad.net/datetime/+bug/142148/comments/20

DC

Revision history for this message
Dylan Jay (t-launchpad-dylanjay-com) wrote :

Hi,

No I don't believe this bug only affects CST and EST. This bug is about overriding environment variables in zope and how it works with "instance console" and doesn't work with runzope.py. The TZ example is just that, an example. but then again I haven't tried other environment variables to show that the same thing happens with them :)

Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.