On 16 Sep 23:42, Ivo Ulrich wrote: > The reason why I could not login to trytond 3.2.2 was because the clients > session was always expired. > > The sessions db entry in ir_session is created with a "create_date" in UTC > once I enter the password. > > But the trytond server which should (since series 3.2 I think) be in UTC is > not, since time.tzset() is not implemented on Windows!! > > See: > > trytond/__init__.py > > os.environ['TZ'] = 'UTC' > if hasattr(time, 'tzset'): > time.tzset() > > > So datetime.datetime.now() returns the local time on my machine which is > not in UTC but +2 hours ;) > > And thats why the session timeout check Session.check(user, key) always > fails, with a default session timeout of 10min. > > Found a good link on the topic with a possible solution > > http://www.pceworld.com/view/4360981 > > Havent tried it yet, would need to compile python myself enabling enable > HAVE_WORKING_TZSET. > > But since my production server is linux I am not going to continue > developing on windows for now. At least I hope I could save someone some > time :)
I created: https://bugs.tryton.org/issue4192 By the way, you don't need to compile Python to get trytond working on windows. You just have to set the timezone for trytond process to UTC. There are at least for windows7: http://www.windows-commandline.com/tzutil-set-timezone-windows-7/ -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
pgpDvSXN_rVLt.pgp
Description: PGP signature
