diff --git a/service b/service index b6ad8e6..5f34318 100755 --- a/service +++ b/service @@ -19,12 +19,13 @@ def log(msg): def idle(seconds, event_start, event_tz): end = time.time() + seconds log("sleeping for {} seconds".format(seconds)) + timezone = pytz.timezone(event_tz) while time.time() < end: send_data = { 'day': '??', + 'time': time.time() } if event_start is not None: - timezone = pytz.timezone(event_tz) event_now = datetime.now(timezone) utc_now = datetime.now(pytz.utc) @@ -43,9 +44,6 @@ def idle(seconds, event_start, event_tz): log("NOW: {}".format(event_now.isoformat())) send_data['day'] = day_info.days - send_data['time'] = int(time.time() + utc_offset) - else: - send_data['time'] = time.time() for k,v in send_data.items(): node.send_raw('root/plugin/pretalx/{}:{}'.format(k, v)) diff --git a/tile.lua b/tile.lua index b96aaed..9205b5f 100644 --- a/tile.lua +++ b/tile.lua @@ -15,7 +15,7 @@ local all_next_talks = {} local room_next_talks = {} local current_room local day = 0 -local time = 1695989869 +local time = 0 local show_language = true local show_track = true @@ -83,10 +83,8 @@ local function wrap(str, font, size, max_w) end local function check_next_talks() + time = api.clock.unix() log("time is now " .. time) - if time == 0 then - return - end room_next_talks = {} all_next_talks = {}