Skip to content

Timezone

The timezone setting determines how schedules are evaluated. A 9 AM schedule uses 9 AM in your configured timezone.

{
"settings": {
"timezone": "America/New_York"
}
}
Terminal window
nextdns-blocker config set timezone America/Los_Angeles

During init, timezone is automatically detected:

PlatformMethod
macOS/etc/localtime symlink
Linux/etc/localtime symlink
Windowstzutil /g command
FallbackTZ environment variable
DefaultUTC
CityTimezone
New YorkAmerica/New_York
ChicagoAmerica/Chicago
DenverAmerica/Denver
PhoenixAmerica/Phoenix
Los AngelesAmerica/Los_Angeles
AnchorageAmerica/Anchorage
HonoluluPacific/Honolulu
CityTimezone
LondonEurope/London
ParisEurope/Paris
BerlinEurope/Berlin
MadridEurope/Madrid
RomeEurope/Rome
AmsterdamEurope/Amsterdam
MoscowEurope/Moscow
CityTimezone
TokyoAsia/Tokyo
ShanghaiAsia/Shanghai
Hong KongAsia/Hong_Kong
SingaporeAsia/Singapore
SydneyAustralia/Sydney
AucklandPacific/Auckland
DubaiAsia/Dubai
MumbaiAsia/Kolkata
CityTimezone
TorontoAmerica/Toronto
VancouverAmerica/Vancouver
Mexico CityAmerica/Mexico_City
São PauloAmerica/Sao_Paulo
Buenos AiresAmerica/Argentina/Buenos_Aires
ZoneTimezone
UTCUTC
GMTEtc/GMT

NextDNS Blocker uses IANA timezone names. Full list: List of tz database time zones

  • Region/City format: America/New_York
  • Always use underscores: New_York not New York
  • Case sensitive (typically capitalized)
{
"schedule": {
"available_hours": [
{
"days": ["monday"],
"time_ranges": [{"start": "09:00", "end": "17:00"}]
}
]
}
}
TimezoneAvailable AtIn UTC
America/New_York9 AM - 5 PM ET14:00 - 22:00 UTC
America/Los_Angeles9 AM - 5 PM PT17:00 - 01:00 UTC
Europe/London9 AM - 5 PM GMT09:00 - 17:00 UTC
Asia/Tokyo9 AM - 5 PM JST00:00 - 08:00 UTC

IANA timezones automatically handle DST:

  • America/New_York switches between EST and EDT
  • Europe/London switches between GMT and BST
  • Schedules adjust automatically
Terminal window
nextdns-blocker status

Shows current time with timezone:

Time: 2024-01-15 14:30:00 America/New_York
Terminal window
nextdns-blocker config show | grep timezone
Terminal window
nextdns-blocker config set timezone Europe/London
Terminal window
nextdns-blocker config edit

Change the timezone value and save.

Terminal window
nextdns-blocker init

Re-detects system timezone.

When traveling across timezones:

  1. Keep original timezone - Schedules stay consistent
  2. Update to local timezone - Schedules adjust to local time

Recommendation: Keep your “home” timezone for consistency.

If you work with teams in different timezones:

  1. Configure for your local timezone
  2. Adjust schedules to account for meeting times
  3. Consider using UTC if working globally
  1. Check configured timezone:

    Terminal window
    nextdns-blocker config show | grep timezone
  2. Verify system timezone:

    Terminal window
    # macOS/Linux
    date
    # Windows
    tzutil /g
  3. Update if mismatched:

    Terminal window
    nextdns-blocker config set timezone America/New_York
  1. Check timezone is correct

  2. Verify 24-hour time:

    • 6 PM = 18:00
    • 9 AM = 09:00
  3. Check day name:

    • Use lowercase: monday
    • Verify correct day
  1. Check spelling (case sensitive)
  2. Use Region/City format
  3. Consult IANA timezone list
Terminal window
# Valid
nextdns-blocker config set timezone America/New_York
# Invalid
nextdns-blocker config set timezone EST
nextdns-blocker config set timezone Eastern
nextdns-blocker config set timezone new_york

IANA timezones handle DST automatically. If you see issues:

  1. Update tzdata package:

    Terminal window
    pip install --upgrade tzdata
  2. Ensure Python 3.9+ (uses zoneinfo)

NextDNS Blocker uses Python’s zoneinfo module (Python 3.9+):

from zoneinfo import ZoneInfo
tz = ZoneInfo("America/New_York")

Timezone data comes from:

  • System tzdata on macOS/Linux
  • tzdata Python package (bundled)

Valid timezones are checked against the IANA database during:

  • config set timezone
  • config validate
  • init