Hello,
I try to add timezone in conf file:
timezone = Europe/Madrid
timezone = UTC
When I run a py script I get error from postgres. When I run with
trytond -c /etc/file.conf I don't get error about PSQL timezone
= Script ==
TRYTOND_DB = 'try30demo'
TRYTOND_CONF = '/etc/tryton_dev.conf'
from trytond.config import CONFIG
CONFIG.update_etc(TRYTOND_
CONF)
from trytond import backend
#~ from trytond.backend.postgresql import Database
from trytond.modules import register_classes
register_classes()
from trytond.pool import Pool
# Load and initialise pool
Database = backend.get('Database')
database = Database(TRYTOND_DB).connect()
pool = Pool(TRYTOND_DB)
pool.init()
== Error ==
File "webservices.py", line 21, in <module>
database = Database(TRYTOND_DB).connect()
File
"/home/resteve/virtualenv/try30/src/trytond/trytond/backend/postgresql/database.py",
line 68, in connect
self._connpool = ThreadedConnectionPool(minconn, maxconn, dsn)
File "/usr/lib/python2.7/dist-packages/psycopg2/pool.py", line 180,
in __init__
self, minconn, maxconn, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/psycopg2/pool.py", line 82, in __init__
self._connect()
File "/usr/lib/python2.7/dist-packages/psycopg2/pool.py", line 86, in _connect
conn = psycopg2.connect(*self._args, **self._kwargs)
File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line
179, in connect
connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL: invalid value for parameter "TimeZone": ""