Skip to content

Commit cbb3f4f

Browse files
committed
Merge PR #813 into 18.0
Signed-off-by guewen
2 parents 12da9db + 26e94fc commit cbb3f4f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

queue_job/jobrunner/runner.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
of running Odoo is obviously not for production purposes.
124124
"""
125125

126-
import datetime
127126
import logging
128127
import os
129128
import selectors
@@ -170,15 +169,10 @@ def _channels():
170169
)
171170

172171

173-
def _datetime_to_epoch(dt):
172+
def _odoo_now():
174173
# important: this must return the same as postgresql
175174
# EXTRACT(EPOCH FROM TIMESTAMP dt)
176-
return (dt - datetime.datetime(1970, 1, 1)).total_seconds()
177-
178-
179-
def _odoo_now():
180-
dt = datetime.datetime.utcnow()
181-
return _datetime_to_epoch(dt)
175+
return time.time()
182176

183177

184178
def _connection_info_for(db_name):

0 commit comments

Comments
 (0)