TV guides

Read a programme time in the source time zone

Convert an explicit XMLTV offset to UTC, then to the viewer’s region. Use the programme date when local clocks change.

Start from a complete source timestamp

Read the source wall time and the offset together. In 20260716200000 +0200, the wall clock is 20:00 and the offset is two hours ahead of UTC, so the event is at 18:00 UTC. The viewer’s device should then display that instant using its local time zone and date rules. A local label on its own does not identify a universal time.

For that sample July programme, the display is 19:00 in London and 23:00 in Karachi. The programme’s absolute instant is unchanged. When dates are near midnight, the date may change during conversion. Include the date in a message about a schedule problem.

Source or displayDate and timeMeaning
Source XMLTV20260716200000 +020020:00 with a two-hour positive offset.
UTC16 July 2026 at 18:00The same instant in the common reference.
Europe/London16 July 2026 at 19:00London summer display.
Asia/Karachi16 July 2026 at 23:00Karachi display.

One wall-clock hour can occur twice

In New York on 1 November 2026, 01:30 with offset −0400 corresponds to 05:30 UTC. The later 01:30 with offset −0500 corresponds to 06:30 UTC. Those are separate slots. If a guide editor writes only 01:30 or the player removes the offset early, the two listings can collapse into one or appear in the wrong order.

Where the device allows it, choose a geographic zone such as America/New_York. The zone database carries date-specific rules. A permanent UTC−5 setting applies the same offset all year and can be wrong on a summer date. XMLTV’s default for a timestamp with no explicit zone is UTC, even when the feed publisher meant a local clock.

A conversion you can repeat

  1. Keep the original timestamp including offset. Confirm that the date and time are complete enough to place a programme.
  2. Subtract a positive offset to find UTC, or add the absolute amount of a negative offset. Carry over any midnight date change.
  3. Convert the UTC result to your geographic zone for that date. Compare it with the player and the channel’s published schedule.
  4. If different sources disagree, retain each original timestamp and the computed UTC result for the guide provider.

Sources and further reading