Skip to content
In ten days the clocks go back. Is your medication schedule ready?
article3 min read78 viewsOct 15, 2026

In ten days the clocks go back. Is your medication schedule ready?

Hannah Weiss@hannahweiss

October 15, 2026 · 3 min read

#1 in Vitals and Variables

78 views3 comments

On the last Sunday of October most of Europe goes back from summer time to standard time, and the hour from 02:00 to 03:00 happens twice. For most software this is a small annoyance. In a hospital it can mean a dose documented twice, or an infusion total calculated over the wrong number of hours.

Siobhan wrote a very good story here some weeks ago about a renewal test that failed one night a year. This is the clinical member of the same family of bugs, with the rules we use.

What actually goes wrong

  • The duplicated hour. A medication given at 02:30 the first time and another one at 02:30 the second time look identical if you store local time without an offset. Sorting by the local timestamp puts them in random order.
  • Durations. "Every 8 hours" scheduled by wall clock from 22:00 gives 06:00, but that night there were 9 real hours in between. For most drugs this is fine. For some it is not, and those schedules must run on elapsed time.
  • Daily balances. Fluid balance is usually summed over 24 hours. That night has 25. The totals look one hour high unless the logic knows.
  • Interfaces. HL7 v2 timestamps very often have no offset. Two systems on two servers with a different time zone configuration will disagree, silently.

Rules that help

  1. Store instants in UTC or with an explicit offset, and convert to local time only for display. In Postgres use timestamptz, which stores the instant, and set the session time zone for display.
  2. Keep dates that are dates as dates. A birth date or a planned admission day is not an instant. Do not store it as midnight UTC.
  3. In FHIR a dateTime that contains a time must have an offset. Validate that you send one. FHIR also allows partial dates like 1950-03 when the day is unknown, so your code should accept them instead of inventing the first of the month.
  4. For HL7 v2, agree in the interface specification which time zone the timestamps without offset mean, and write it down. Log the raw value next to the parsed one.
  5. Test it. Pin the clock to 01:30 local time on the night of the change and run the medication scheduling tests. Do the same for the spring change, where 02:30 does not exist at all.

On the ward the night of the change was always a little bit strange. The paper charts had a special line for the second 02:00. I still think that was good design, because it made the problem visible. Software tends to hide it.

Written by

Hannah Weiss

Clinical informatics engineer in Berlin. I build integrations between hospital systems: HL7v2, FHIR, and a lot of patience. Formerly a nurse, which explains my opinions about alert fatigue.

Get the best of #vitals_and_variables weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.

Comments

3

Sign in to join the conversation.

Sign in to comment
Siobhan O'Rourke@siobhan_tests#3 in Vitals and Variables
the paper chart with a special line for the second 02:00 is genuinely great design. @marcus_oncall this ones for you
2 net votes
Marcus Johnson@marcus_oncall#2 in Vitals and Variables
every year on this weekend i get paged for a cron job that ran twice. every single year. this year im pinning the clock in tests like you said, thank you
0 net votes
Yuki Tanaka@yuki_ios#8 in Vitals and Variables
On iOS, Calendar and DateComponents handle this correctly if you add by components and not by seconds. Many bugs I saw come from adding 86400 seconds for "one day".
2 net votes