start_s = start_s / resolution * resolution
end_s = end_s / resolution * resolution
+ # Timezone offset in seconds at start time *including* DST
+ tz_offset = start_s - calendar.timegm(cls.start.timetuple())
labels = [item for item in rrd_filenames]
for label, filename in rrd_filenames:
# Coerce from seconds to milliseconds Unix-time is in seconds.
+ # Also subtract timezone offset in order to display the axis in local time.
for i in range(len(data)):
- data[i] = [(
t*1000, v) for t, v in data[i]]
+ data[i] = [(*1000, v) for t, v in data[i]]
# Wrap up the output into a list of dicts