[6.1/Trunk] server timezone config is silently ignored

Bug #970538 reported by Carlos Vásquez (ClearCorp)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

The server timezone is always set to UTC as of v6.1 as a design choice. The corresponding timezone config value is however still accepted but silently ignored, so the admin is never notified of this fact. A warning message should be printed at least.

=== Original description ===
The server timezone is always set to UTC. The timezone config value is not used.

Related branches

Amit Parik (amit-parik)
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
summary: - [6.1] server timezone config is ignored, UTC always
+ [6.1/Trunk] server timezone config is ignored, UTC always
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: [6.1/Trunk] server timezone config is ignored, UTC always

Hi,

It is a design choice in OpenERP 6.1 to forcefully set the server timezone to UTC and ignore the previous --timezone configuration parameter. There are many good reasons for this, and you may find some further explanations about them in some related bug reports: bug 918257 (especially comment #4) and further technical discussions in bug 925361.

I understand that this may look like a bug because the --timezone option was not removed and does not report a warning when you try to use it. So I suggest we change the description of this bug to explain that this is confusing and needs to be changed.

Thanks!

summary: - [6.1/Trunk] server timezone config is ignored, UTC always
+ [6.1/Trunk] server timezone config is ignored without warning, UTC is
+ always used as of 6.1
description: updated
summary: - [6.1/Trunk] server timezone config is ignored without warning, UTC is
- always used as of 6.1
+ [6.1/Trunk] server timezone config is silently ignored
Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) wrote :

I did few tests to see the problem,

Try to see the file /openerp-6.1-1/openerp/tools/config.py at line 438, I think the problem comes from there:

  # TODO checking the type of the parameters should be done for every
        # parameters, not just the timezone.
        # The call to get_server_timezone() sets the timezone; this should
        # probably done here.
        if self.options['timezone']:
            # Prevent the timezone to be True. (The config file parsing changes
            # the string 'True' to the boolean value True. It would be probably
            # be better to remove that conversion.)
            die(not isinstance(self.options['timezone'], basestring),
                "Invalid timezone value in configuration or environment: %r.\n"
                "Please fix this in your configuration." %(self.options['timezone']))

            # If an explicit TZ was provided in the config, make sure it is known

I try to view the self.options['timezone'], but all time it is FALSE.Normally the value should be the result of method get_server_timezone().

I think it is a bug from openErp

if you have an idea, can you tell me.

Revision history for this message
Carlos Vásquez (ClearCorp) (cv.clearcorp) wrote : Re: [Bug 970538] Re: [6.1/Trunk] server timezone config is silently ignored

Olivier Dony told me a while ago that it isn't a bug, but a design
choise. (See https://bugs.launchpad.net/openobject-server/+bug/970538/comments/1).
So we dropped this subject.

I still don't fully agree with this, but I understand their point.
¿What do you propose?

Regards

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.