Ticket #137 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

Time zone name wrong in waterfall header (says I'm in DST when I'm not)

Reported by: spiff Owned by:
Priority: minor Milestone: 0.7.7
Version: 0.7.6 Keywords: daylight savings time DST waterfall
Cc:

Description

Here in November in the US Pacific Time zone, we're currently observing standard time (PST). However, the header of the waterfall display says it's PDT.

In status/web/waterfall.py, function "body", around line 503:

TZ = time.tzname[time.daylight]

Should be:

TZ = time.tzname[time.localtime()[-1]]

It turns out that time.daylight only tells you if the region you're in observes DST at some time of the year; if you want to know whether or not DST is *currently in effect*, you need the last item of the localtime time tuple.

Twisted's log.py also makes this mistake, causing log.msg to report the time wrong in the twistd.log(s).

A similar fix is probably needed in tests/tests_web.py, line 235 (Class Waterfall, def _check1)

Change History

comment:1 Changed 6 years ago by warner

ahh.. that probably explains a lot of the confusion I've experienced over the last few years.

thanks!

comment:2 Changed 5 years ago by warner

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from undecided to 0.7.7
Note: See TracTickets for help on using tickets.