Skip to Content
Menu
This question has been flagged
5 Replies
8587 Views

hi,

I am Using Ubuntu 14.04. My user Time zone is Asia / Calcutta.

but,when I show Log file it show Different Time.

let's take an Example:

my current Time is 2015-09-16 10:45:30

log file shows  2015-09-16 05:15:44.

How Can I set Server Time(Log File Time) as My Current Time.


Avatar
Discard
Best Answer

It's ok for being different, your logs are in UTC, since you have your user with Asia/Calcutta timezone, it can be other users in others timezones in the same database, so the question is: In what specific user time zone the logs should be displayed? It's better in UTC.

Read more here:

https://github.com/odoo/odoo/issues/6350

Avatar
Discard
Author

if timezone different.it's Created Problem in Schedule or Automation or Server Action?

No. I don't thing so

Best Answer

In Odoo 10.0

    @api.multi

    def my_function(self):

        local_tz = pytz.timezone(self.env.user.tz or 'UTC')

        # We obtain the local date

        # My current time is self.date

        # Local zone is local_date

         local_date = fields.Datetime.from_string(self.date).replace(tzinfo=pytz.utc).astimezone(local_tz)

Avatar
Discard
Best Answer

Hi, I have currently the same problem with Odoo 9.

My server time is Central Time but the log timestamps are 5 hours later.  For example:


ubuntu@FLV-UBU-ODOO-01:/var/log/odoo$ date

Thu Aug 11 14:29:33 CDT 2016

ubuntu@FLV-UBU-ODOO-01:/var/log/odoo$ tail odoo9C-server.log

2016-08-11 19:28:51,415 936 INFO OC09_VAZDELAR_TST werkzeug: 10.0.0.45 - - [11/Aug/2016 19:28:51] "POST /web/dataset/call_kw/stock.location/name_get HTTP/1.1" 200 -

2016-08-11 19:28:51,424 936 INFO OC09_VAZDELAR_TST werkzeug: 10.0.0.45 - - [11/Aug/2016 19:28:51] "POST /web/dataset/call_kw/account.tax/fields_get HTTP/1.1" 200 -


Where is Odoo server getting the time from?

I don´t think that could be acceptable.


Help is much appreciated.

Ernesto. 

Avatar
Discard
Related Posts Replies Views Activity
2
Apr 23
1725
2
Feb 21
15259
1
Oct 20
2350
2
Aug 19
2629
0
Sep 16
3194