pipelines icon indicating copy to clipboard operation
pipelines copied to clipboard

Better timezone management

Open zbal opened this issue 7 years ago • 4 comments

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.

zbal avatar Mar 07 '17 06:03 zbal

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.

JuhaS avatar Mar 09 '17 03:03 JuhaS

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.

JuhaS avatar May 12 '17 06:05 JuhaS

What surprises me is that 1 week ago we were "only" 8h behind :) it suddenly doubled

zbal avatar May 12 '17 06:05 zbal

Implemented a fix in #68

Strategy:

  • Generate all timestamps in backend in UTC
  • Convert in frontend from UTC to local timezone.

JuhaS avatar Jun 15 '17 04:06 JuhaS