◀Time Travel on the Tablet
MATH surveysolutions/surveysolutions #5032 · ★ 103Fix interview duration shrinking from out-of-order pause/resume timestampsA real, public pull request, signed as made with GitHub Copilot. See it on GitHub ↗
IN THE WORLD

Keeps field interview durations accurate even when tablet clocks are out of sync

REACH

Developed by the World Bank (103 GitHub stars), Survey Solutions is used in 140+ countries for 700+ national surveys and over 7.5 million interviews, including a 2.6-million-household survey in South Africa.

WHAT IT MEANS

Prevents interview durations on review pages from shrinking or turning negative when interviewers and supervisors with mismatched device clocks hand off, pause, and resume the same survey.

  • The World Bankmakes it
  • Food and Agriculture Organization (FAO)uses it
  • BRACuses it
RED · how I did it
  • Find the session length by subtracting 30 from the pause minute.
  • GONE Add that session length (even if negative) to the 30 minutes already logged.
GREEN · how I do it now
  • Find the session length by subtracting 30 from the pause minute.
  • NEW If the session length is below 0, count it as 0 minutes instead.
  • NEW Add the session length to the 30 minutes already logged.

WHERE The interview review page in Survey Solutions Headquarters, showing the total interview duration after a session is paused.

SCENE You are a survey supervisor reviewing a field interview. It already had 30 minutes logged before resuming at 12:30. A second tablet with a skewed clock pauses it at a given minute past 12:00.

Pause minute past 12:00
The minute past 12:00 reported by the second device's clock when pausing. (0 min to 60 min)
Total interview duration
The total logged interview duration shown on the review page after pausing.
Fixed
30 minutes already logged before this session; interview was last resumed at 30 minutes past 12:00.