pipelines
pipelines copied to clipboard
Better timezone management
Currently it takes the time of the server (?) - and we can't set the timezone to be offering the current time. See what to do.
Where we have timestamps:
- Pipeline output logs.
- Pipeline run list (lists the historical runs for pipeline).
Probably best would be to allow setting timezone in configuration and create all timestamps with:
form datetime import datetime
import pytz
dt = datetime.now(tz=pytz.timezone('Asia/Shanghai'))
We'll also have to pass this config to frontend and set the timezone there.
We also need to improve timestamp management on UI. Currently on some servers if I run the task I see it running 16 hours ago immediately. Once we have proper timezone information in the backend we can use the browser timezone to represent it relative to that, so that user should see "1 seconds ago" always if they just ran the pipeline. Moment.js is good for that, just need to tell it the timezone of the timestamp properly.
What surprises me is that 1 week ago we were "only" 8h behind :) it suddenly doubled
Implemented a fix in #68
Strategy:
- Generate all timestamps in backend in UTC
- Convert in frontend from UTC to local timezone.