Community mailing list archives

ir_cron update nextcall timestamp error in winows odoo env, may be a bug of ir.cron

wade wang
- 08/14/2015 04:14:55

Today, I found that after every ir.cron task executed, the timestamp nextcall will update to more 8 hours than correct timestamps. My time zone is asia shanghai, east 8 zone.


I checked the code in line 162:

                now = fields.datetime.context_timestamp(job_cr, job['user_id'],

e.i: the local time is 2015-08-14 15:32:34.422988, then is same with local time, 2015-08-14 15:32:34.422988


so, after context_timestamp with tz +8, the now is  2015-08-14 23:32:34.422988+08:00


it is wrong!


Then I do the same test on odoo linux env, it works well.


At last, I just print in linux python interpret,  the result same with in windows.


To resolve this problem, I change the to datetime.utcnow(), it works both windows and linux odoo!


Is it a bug of ir.cron?




Wade, Wang


Shanghai, China