---
title: "Time-Window Notifications with UTC Conditions in Echobell"
description: "Use Echobell's built-in UTC time variables to filter notifications by business hours, weekends, or maintenance windows. Includes ready-to-use condition recipes."
date: 2025-11-06
author: Nooc
authorAvatarLink: /images/avatars/nooc.webp
authorLink: https://nooc.me
---

# Time-Window Notifications with UTC Conditions in Echobell

Echobell's built-in UTC time variables let you restrict notifications to specific time windows—business hours, on-call shifts, maintenance windows—directly in channel Conditions. No external filtering layer needed.

Prerequisites: [Conditions](/en/docs/conditions), [Templates](/en/docs/template), [Webhook](/en/docs/webhook), [Email Triggers](/en/docs/email-trigger).

## Available UTC variables

These are read-only, always available, and computed in UTC:

- `timezone` (always "UTC"), `now`/`iso`, `epochMs`, `epochSeconds`
- `year`, `month` (1–12), `monthName`
- `dayOfMonth` (1–31)
- `dayOfWeek` (0–6, Sunday = 0), `dayOfWeekName`
- `hour` (0–23), `minute` (0–59), `second` (0–59)
- `date` (YYYY-MM-DD), `time` (HH:mm:ss)

Use them directly in [Conditions](/en/docs/conditions) (no `{{ }}`). Use with `{{ }}` in [Templates](/en/docs/template).

## Condition recipes

### Weekdays during business hours

```
hour >= 9 && hour < 17 && dayOfWeek >= 1 && dayOfWeek <= 5
```

### Weekends only

```
dayOfWeek == 0 || dayOfWeek == 6
```

### Off-hours (nights and weekends)

```
(hour < 9 || hour >= 17) || dayOfWeek == 0 || dayOfWeek == 6
```

### Maintenance window (Saturdays 01:00–03:00)

```
dayOfWeek == 6 && hour >= 1 && hour < 3
```

### First day of each month at the top of the hour

```
dayOfMonth == 1 && minute == 0
```

### End-of-quarter business hours (Mar/Jun/Sep/Dec)

```
(month == 3 || month == 6 || month == 9 || month == 12) && hour >= 9 && hour < 17 && dayOfWeek >= 1 && dayOfWeek <= 5
```

## Combining time with content filters

Time conditions compose with data variables using standard operators:

- Off-hours escalations for high-severity only:
  ```
  ((hour < 9 || hour >= 17) || dayOfWeek == 0 || dayOfWeek == 6) && (severity == "high" || severity == "critical")
  ```
- Production environment, weekdays only:
  ```
  environment == "production" && dayOfWeek >= 1 && dayOfWeek <= 5
  ```

Conditions are plain expressions—do not wrap them in `{{ }}`. See [Conditions → Supported Operators](/en/docs/conditions#supported-operators).

## Using time variables in templates

The same variables work in templates with `{{ }}`, useful for audit records and human-readable receipts:

```
Sent at {{date}} {{time}} {{timezone}}
Today is {{dayOfWeekName}}, {{monthName}} {{dayOfMonth}}, {{year}}
Epoch: {{epochSeconds}}
```

Mix with data from [Webhook](/en/docs/webhook) or [Email Triggers](/en/docs/email-trigger):

```
{{service}} {{status}} at {{time}} ({{timezone}})
```

## Notes

- All system variables are UTC. If your team spans timezones, account for the offset when setting hour ranges.
- Start with a simple time window, then layer in content filters once it's working.
- Leave a short description on the channel explaining the condition logic (e.g. "Weekdays 09–17 UTC; off-hours only for high severity").

## Next steps

- Add a time-window condition to an existing channel: [Conditions](/en/docs/conditions)
- Customize notification content with variables: [Templates](/en/docs/template)
- Create separate channels for business hours vs. on-call windows
- Set on-call channels to Calling notification type for off-hours urgency
