|
|
@ -835,7 +835,6 @@ def get_odometer(channel):
|
|
|
|
SELECT timestamp, clock, timeofday
|
|
|
|
SELECT timestamp, clock, timeofday
|
|
|
|
FROM bus_data
|
|
|
|
FROM bus_data
|
|
|
|
WHERE clock IS NOT NULL
|
|
|
|
WHERE clock IS NOT NULL
|
|
|
|
AND timeofday IS NOT NULL
|
|
|
|
|
|
|
|
AND channel = %(channel)s
|
|
|
|
AND channel = %(channel)s
|
|
|
|
AND timestamp > %(start)s
|
|
|
|
AND timestamp > %(start)s
|
|
|
|
AND timestamp <= %(end)s
|
|
|
|
AND timestamp <= %(end)s
|
|
|
@ -849,7 +848,8 @@ def get_odometer(channel):
|
|
|
|
clock_face = None
|
|
|
|
clock_face = None
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
clock12h = result.clock
|
|
|
|
clock12h = result.clock
|
|
|
|
timeofday = result.timeofday
|
|
|
|
# HACK: assume null means dawn, as we can reliably detect everything else.
|
|
|
|
|
|
|
|
timeofday = result.timeofday or "dawn"
|
|
|
|
|
|
|
|
|
|
|
|
clock24h = clock12h
|
|
|
|
clock24h = clock12h
|
|
|
|
if time_is_pm(conn, result.timestamp, clock12h, timeofday):
|
|
|
|
if time_is_pm(conn, result.timestamp, clock12h, timeofday):
|
|
|
|