← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 711084] Re: [6.0, trunk] pytz zoneinfo missing from windows packaging - timezone conversion not working

 

I stopped the openerp-web service, checked the log files; they are:

# logging
log.access_file = "/var/log/openerp-web/access.log"
log.error_file = "/var/log/openerp-web/error.log"

Restarted openerp-web; logged in on the web browser, went to Sales / Phones / Outbound / New.
The time is incorrect: it shows: "05/03/2011 09:26:07" - wrong; it should show "04/03/2011 17:26:07".
Went into the GTK client on the Windows 7 PC; it showed "04/03/2011 17:35:13" - correct.

Logged into the server and ran the date and echo $TZ commands:

/home/philu> date
Fri Mar  4 17:36:28 AEDT 2011
/home/philu> echo $TZ
AEST-10AEDT-11,M10.5.0,M3.5.0

Time is shown correctly.

Double-checked the user preferences: Australia/Sydney - correct.
The error log file didn't show any errors at all; all it showed was:

[03/Mar/2011:22:20:51] INFO Loading module 'openerp'
[03/Mar/2011:22:20:52] INFO Loading module 'view_calendar'
[03/Mar/2011:22:20:53] INFO Loading module 'view_graph'
[03/Mar/2011:22:20:53] INFO Loading module 'view_diagram'

-----------

Dug back through the openerp-server log file; found this - the
interesting bit is the fourth-last line:

[2011-03-04 17:26:07,676][?] DEBUG_RPC:service:'object'
[2011-03-04 17:26:07,676][?] DEBUG_RPC:method:'execute'
[2011-03-04 17:26:07,677][?] DEBUG_RPC:params:['openerp601',
[2011-03-04 17:26:07,677][?] DEBUG_RPC:params: 1,
[2011-03-04 17:26:07,678][?] DEBUG_RPC:params: '*',
[2011-03-04 17:26:07,678][?] DEBUG_RPC:params: 'crm.phonecall',
[2011-03-04 17:26:07,678][?] DEBUG_RPC:params: 'default_get',
[2011-03-04 17:26:07,678][?] DEBUG_RPC:params: ['user_id',
[2011-03-04 17:26:07,678][?] DEBUG_RPC:params:  'description',
[2011-03-04 17:26:07,678][?] DEBUG_RPC:params:  'categ_id',
[2011-03-04 17:26:07,678][?] DEBUG_RPC:params:  'partner_address_id',
[2011-03-04 17:26:07,678][?] DEBUG_RPC:params:  'section_id',
[2011-03-04 17:26:07,679][?] DEBUG_RPC:params:  'priority',
[2011-03-04 17:26:07,679][?] DEBUG_RPC:params:  'duration',
[2011-03-04 17:26:07,679][?] DEBUG_RPC:params:  'state',
[2011-03-04 17:26:07,679][?] DEBUG_RPC:params:  'partner_mobile',
[2011-03-04 17:26:07,679][?] DEBUG_RPC:params:  'date',
[2011-03-04 17:26:07,679][?] DEBUG_RPC:params:  'opportunity_id',
[2011-03-04 17:26:07,679][?] DEBUG_RPC:params:  'partner_id',
[2011-03-04 17:26:07,679][?] DEBUG_RPC:params:  'partner_phone',
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params:  'name'],
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params: {'_terp_view_name': u'Outbound',
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params:  'active_id': 245,
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params:  'active_ids': [245],
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params:  'active_model': 'ir.ui.menu',
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params:  'bin_size': True,
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params:  'client': 'web',
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params:  'default_categ_id': 13,
[2011-03-04 17:26:07,680][?] DEBUG_RPC:params:  'default_state': 'open',
[2011-03-04 17:26:07,681][?] DEBUG_RPC:params:  'lang': u'en_GB',
[2011-03-04 17:26:07,681][?] DEBUG_RPC:params:  'search_default_current': 1,
[2011-03-04 17:26:07,681][?] DEBUG_RPC:params:  'search_default_section_id': False,
[2011-03-04 17:26:07,681][?] DEBUG_RPC:params:  'search_view': 509,
[2011-03-04 17:26:07,681][?] DEBUG_RPC:params:  'section_id': False,
[2011-03-04 17:26:07,681][?] DEBUG_RPC:params:  'tz': u'Australia/Sydney'}]
[2011-03-04 17:26:07,683][openerp601] DEBUG_RPC_ANSWER:result:{'categ_id': 13,
[2011-03-04 17:26:07,683][openerp601] DEBUG_RPC_ANSWER:result: 'date': '2011-03-04 17:26:07',
[2011-03-04 17:26:07,683][openerp601] DEBUG_RPC_ANSWER:result: 'priority': '3',
[2011-03-04 17:26:07,683][openerp601] DEBUG_RPC_ANSWER:result: 'state': 'open',
[2011-03-04 17:26:07,683][openerp601] DEBUG_RPC_ANSWER:result: 'user_id': 1}

Checked the TZ environment variable for the user that the openerp-web
server is running under; it is not set to anything.

Checked the TZ environment variable for the user that the openerp-server process is running under; it is set in the /home/openerp/.bashrc file:
TZ='Australia/Sydney'
export TZ

So it looks like the openerp-server is giving the correct time, and the
openerp-web server is adding 10 hours onto it.

I then stopped the openerp-web service, set it's TZ:
TZ='Australia/Sydney'
export TZ

Restarted the openerp-web service, logged in to the web interface, and still got a time of this:
05/03/2011 09:41:44

Checked the error log for openerp-web; still no errors.

Hope that helps.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/711084

Title:
  [6.0,trunk] pytz zoneinfo missing from windows packaging - timezone
  conversion not working

Status in OpenERP GTK Client:
  Confirmed
Status in OpenERP Web Client:
  Confirmed

Bug description:
  OpenERP server and web client 6.0.1 running on Ubuntu server (32-bit) 10.10
  Postgres 8.4
  Windows GTK client and web browser (Google Chrome) on WIndows 7 (64-bit)

  (Server and web client were set up as per
  http://powerphil.wordpress.com/2011/01/28/how-to-install-and-
  configure-an-openerp-6-0-1-server-and-web-server-on-an-
  ubuntu-10-10-server/).

  Problem is that the times shown in the GTK client are shown at GMT (unless the server's TZ environment variable is set), i.e. they ignore the user's Timezone preference.
  However, the web client works correctly.

  More details:
  Ubuntu server's time is correctly set to GMT. For example, if the time in London is 1am, the server's time also shows 1am (by doing a "date" on the command line, and the TZ environment variable is not set to anything).

  Both openerp-server and openerp-web processes are running without any
  TZ setting.

  Then log into OpenERP using a web browser; set the User's preference
  to Australia/Sydney; create a new Phone Call, Outbound; the time
  correctly shows 12 noon (GMT + 11 hours, Sydney currently being on
  summer time).

  Do the same in the GTK client; the time shows 1am - wrong; it should
  be 12 noon.

  ---------

  More information:

  So try to work around the problem: in the .bashrc file of the openerp user that runs the openerp-server process, set the TZ, viz:
  TZ='AEST-10AEDT-11,M10.5.0,M3.5.0'
  export TZ

  Restart the service; log into the GTK client; create a new phone call; the time now shows correctly (for the wrong reasons, admittedly).
  Go to the web browser and do the same thing; the time now shows 19 hours ahead of what it should be (on the next day!). Wrong.

  So it looks like the web client is taking timezone time into account,
  in addition to whatever the openerp-server is doing, and it should be
  the other way around: the openerp-server should be calculating the
  correct time, and the web server should just be presenting it.



References