[Zope-DB] Localised date format
Le grande pinguin
rm@mh-freiburg.de
Fri, 29 Nov 2002 18:26:41 +0100
On Fri, Nov 29, 2002 at 06:07:58PM +0100, Charlie Clark wrote:
> Dear list,
>
> I can't seem to be able to convince Zope to use DateStyle German in
> PostgreSQL
> SET DateStyle to German;
> works fine in psql but is a runtime condition and I don't seem to be able
> to set it from within Zope.
> The alternative of using to_char(my_date, 'DD.MM.YYYY') seems to be very
> resource intensive.
>
> Is there a way of making DateSytle German permanent? and doing this from
> within Zope?
Hello,
if i recall right i once did submit a patch for psycopg that made
client encoding customizable _per connection_ but i never checked
whether it made it into the distro. The main problem with such things
is the following: things like client encoding and DateStyle can only
be set on a _per connection_ basis. Zope serializes database access
into one connection. So if two "Zope Applications" share the same
database connection the are forced to use the same client encoding/date style
etc. This _can_ quickly turn into a headache ...
hth Ralf Mattes
> Thanx
>
> Charlie
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db