Merge lp://qastaging/~liuyq0307/lava-scheduler/fix-861149 into lp://qastaging/lava-scheduler
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Michael Hudson-Doyle | ||||
Proposed branch: | lp://qastaging/~liuyq0307/lava-scheduler/fix-861149 | ||||
Merge into: | lp://qastaging/lava-scheduler | ||||
Diff against target: |
28 lines (+10/-1) 1 file modified
lava_scheduler_daemon/dbjobsource.py (+10/-1) |
||||
To merge this branch: | bzr merge lp://qastaging/~liuyq0307/lava-scheduler/fix-861149 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zygmunt Krynicki (community) | Disapprove | ||
Review via email: mp+78990@code.qastaging.launchpad.net |
Description of the change
I am not very clear about the decorator of @transaction.
but if I changed it to @transaction.
In my opinion, the submit_time and end_time is submitted in UTC, but the start_time is submitted in the local TIMEZONE of the server OS.
So if use utcnow to set start_time in getLogFileForJo
BTW,
1. after sentence "from django.db.models import Q", the timezone will be changed to UTC.
2. the TIMEZONE settings seems only useful for backend of PostgreSQL in django.db
For the following description in django/
# DatabaseWrapper
# we manually create the dictionary from the settings, passing only the
# settings that the database backends care about. Note that TIME_ZONE is used
# by the PostgreSQL backends.
Unmerged revisions
- 81. By Yongqin Liu
-
make start_time use local time to avoid the problem that start_time is before submit_time
This is wrong, don't do this.
Using utcnow() is correct, rendering the timezone should be fixed instead. If we have legacy records that used now() vs utcnow() we can either fix them in the datbase or just ignore them.
Look up django's TZ setting for details.