• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

medplum / medplum / 22237056785
92%
main: 92%

Build:
Build:
LAST BUILD BRANCH: noah/book-with-patient-info
DEFAULT BRANCH: main
Ran 20 Feb 2026 07:05PM UTC
Jobs 1
Files 734
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Feb 2026 06:50PM UTC coverage: 92.326%. Remained the same
22237056785

push

github

web-flow
Fix scheduling ops during UTC/local day discrepancy (#8447)

For operations like `$find` and `$book`, there is an interesting edge
case: when the server is run in a different time zone (such as a server
in UTC and clients in the US), there is a window where the current
date in the server local time is different from the client date.

The original implementation of `eachDayOfInterval` naively used the date
component from the interval start without the time components, and so
wasn't shifting appropriately to the correct time when the timezone
information was added.

I've adjusted the implementation to begin by creating an exact
`Temporal.Instant` from the interval start date, and then using
`.toZonedDateTime(timezone)` to shift that into the desired timezone.
Finally, to keep the previous behavior of emitting start-of-day temporal
instances, we explicitly set the time components to zero with
`withPlainTime(...)`.

Implementation Note: Testing this is a bit of a chore. The test case as
written passes on my machine when run naively with `npm test`, because
Node defaults to running with the same time zone as the local system.
You can see the test fail by explicitly setting the process to be in a
different timezone: `TZ=utc npm test`. Ideally we should be able to test
different server/client timezone options, but adjusting the Node
timezone after startup seems to be more fraught than expected (see
packages like https://www.npmjs.com/package/timezone-mock for some
potential solutions).

For now I'm adding a test case that would reveal the problem in CI,
where tests are run with the system time set to UTC. In the long term,
we probably want a set of integration tests that spin up servers with a
variety of configurations, which would allow us to test multiple servers
with different timezones and compare their results. I'm deferring
building that into the future for now.

Fixes: https://github.com/medplum/medplum/issues/8417

Signed-off-by: Noah Silas <noah@medplum.com>

17302 of 19609 branches covered (88.23%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

31415 of 33157 relevant lines covered (94.75%)

13708.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 22237056785.1 20 Feb 2026 07:05PM UTC 734
92.33
GitHub Action Run
Source Files on build 22237056785
  • Tree
  • List 734
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b1652353 on github
  • Prev Build on gh-readonly-queue/main/pr-8477-b566f6fcb21acc6f3ad8b3552a663abdd20a35d9 (#22237055927)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc