Time zonesScheduler
Run the timeline in any IANA time zone, understand how event times are read and displayed, and handle daylight saving transitions correctly.
The scheduler computes everything (ticks, header labels, working-time shading, snapping and the "now" line) in a single time zone. By default that is the browser's time zone. Set timeZone to plan in a zone of your choice, for example the time zone of the site where a crew is working.
import { createScheduler } from '@birchui/scheduler';
createScheduler(container, {
resources: berlinCrews,
events: installations,
start: '2026-12-07',
end: '2026-12-12',
viewPreset: 'dayAndWeek',
timeZone: 'Europe/Berlin',
locale: 'de-DE',
});A dispatcher in Chicago who opens this board sees 07:00 to 16:00 shifts as 07:00 to 16:00, the way the crews in Berlin experience them, not as 00:00 to 09:00.
Time zone identifiers#
timeZone takes an IANA identifier such as 'America/New_York', 'Europe/London', 'Asia/Kolkata' or 'UTC'. The scheduler uses the browser's Intl support, so there is no time zone database to download or keep up to date; browsers ship and update it.
List the identifiers the current browser supports, for example to fill a picker:
const zones = Intl.supportedValuesOf('timeZone');Change the zone at runtime with update:
siteSelect.addEventListener('change', () => {
scheduler.update({ timeZone: siteSelect.value });
});When the zone changes, every event's original start and end values are read again in the new zone. Local strings keep their wall-clock time (a 07:00 shift stays at 07:00 on the new clock), while instants keep their absolute moment and move on the axis.
How times are read#
Each start and end value, in events, in the scheduler's own range and in method arguments, is turned into an instant using these rules:
| Input | Example | Meaning |
|---|---|---|
| ISO string without offset | '2026-12-07T07:00' |
07:00 wall-clock time in the scheduler's timeZone. |
| Date only | '2026-12-07' |
Midnight at the start of that day in the scheduler's timeZone. |
ISO string with Z or an offset |
'2026-12-07T06:00:00Z' |
That exact instant, shown in the scheduler's zone. |
Date or epoch milliseconds |
new Date('2026-12-07T06:00:00Z') |
That exact instant, shown in the scheduler's zone. |
Choose the form that matches what your data means:
- Local strings fit times that are defined on a site's clock: a store opening, a room booking, a shift that always starts at 07:00 where the work happens.
- Instants (UTC strings,
Date, numbers) fit times that are absolute: a video call with participants in several zones, or anything your server already stores as UTC.
Mixing both is fine. Each value is converted on its own.
How times are reported#
Event payloads and API return values carry Date objects, which are absolute instants. A Date has no time zone of its own, so format it with the scheduler's zone when you display it:
const timeFormat = new Intl.DateTimeFormat('en-GB', {
timeZone: 'Europe/Berlin',
weekday: 'short',
hour: '2-digit',
minute: '2-digit',
});
scheduler.on('eventDrop', ({ event, start, end }) => {
statusLine.textContent = `${event.title}: ${timeFormat.format(start)} to ${timeFormat.format(end)}`;
});To send the server a wall-clock string in the scheduler's zone instead of UTC, format the parts yourself:
function toZonedLocalIso(date: Date, timeZone: string): string {
const parts = Object.fromEntries(
new Intl.DateTimeFormat('en-CA', {
timeZone,
hourCycle: 'h23',
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
})
.formatToParts(date)
.map((part) => [part.type, part.value]),
);
return `${parts.year}-${parts.month}-${parts.day}T${parts.hour}:${parts.minute}`;
}
toZonedLocalIso(new Date('2026-12-07T06:00:00Z'), 'Europe/Berlin');The last line returns '2026-12-07T07:00', which the scheduler reads back as the same instant when timeZone is 'Europe/Berlin'.
Daylight saving time#
Because the axis is built from calendar boundaries in the scheduler's zone, clock changes are handled where they happen:
- Day, week and month ticks start at local midnight. The day a clock change happens is 23 or 25 hours long, and in
'hourAndDay'it has 23 or 25 hour columns. - Hour ticks follow the local clock. On the spring-forward night in Berlin (28 March 2027), the hour header goes from 01:00 straight to 03:00.
- Snapping works on wall-clock time, so a job dragged across a clock change still lands on 15-minute marks of the local clock.
- Working-time shading uses local hours, so 08:00 to 17:00 stays 08:00 to 17:00 on both sides of the change.
Two kinds of local time need a rule, and the scheduler applies these:
| Situation | Example in Europe/Berlin |
Result |
|---|---|---|
| A time that does not exist (spring forward) | '2027-03-28T02:30' |
Moves forward by the gap, to 03:30 CEST. |
| A time that happens twice (fall back) | '2027-10-31T02:30' |
The first occurrence, 02:30 CEST (00:30 UTC). |
If you need the second occurrence of an ambiguous time, pass an instant with an explicit offset, such as '2027-10-31T02:30+01:00'.
The "now" line#
The now line marks the current time, placed in the scheduler's zone like everything else. It is shown by default; showNowLine: false hides it. For screenshots, demos and tests, pin the clock with now:
createScheduler(container, {
resources,
events,
start: '2026-12-07T06:00',
end: '2026-12-07T20:00',
viewPreset: 'hourAndDay',
timeZone: 'America/Chicago',
now: '2026-12-07T10:15',
});Next steps#
- Working time for business hours and weekends.
- View presets and zoom for header labels in any locale.