Comment 6 for bug 711084

Revision history for this message
philu (philu) wrote :

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.