-
Notifications
You must be signed in to change notification settings - Fork 201
DHCP: Timezone
spamcop edited this page Oct 22, 2025
·
6 revisions
Dynamic Host Configuration Protocol (DHCP) can deliver timezone information to clients, improving time synchronization without manual setup. This uses vendor-specific options defined in RFC 4833.
- Option 100 (PCode): POSIX timezone string (e.g., "EST5EDT").
- Option 101 (TCode): IANA TZ database name (e.g., "America/New_York").
Clients request these via Parameter-Request List (option 55). Servers include them in DHCP Offers and ACKs if requested.
Configure on DHCP servers like MikroTik, pfSense, or OpenWRT:
- Define options (e.g., code 100 value "EST5EDT", code 101 value "America/New_York").
- Assign to network/subnet.
- Example (MikroTik):
/ip dhcp-server option add code=100 name=pcode value="'EST5EDT'" /ip dhcp-server option add code=101 name=tcode value="'America/New_York'" /ip dhcp-server network set 0 dhcp-option="pcode,tcode" - Example (Openwrt - /etc/config/dhcp):
config dhcp 'lan' option interface 'lan' option start '100' option limit '150' option leasetime '12h' option dhcpv4 'server' list dhcp_option '42,192.168.10.1' list dhcp_option '101,"Europe/Berlin"'
Renew client leases to apply.
Embedded Linux (udhcpc) requests with -O 100 -O 101. Thingino uses udhcpc as dhcp client. Windows and Raspberry Pi support via APIs. Verify with tcpdump or Wireshark.
- Thingino gets ntp server from DHCP Option 42 ($ntpsrv) and sets this server in /etc/ntp.conf
- Thingino gets timezone from DHCP Option 101 ($tzdbstr) and uses tzselect to setup this timezone
- Thingino currently doesnt do anything with DHCP Option 100 ($tzstr) from dhcp server
# Option 100 - POSIX TZ Code
dhcp-option=100,"NZST-12NZDT,M9.5.0/2,M4.1.0/3"
# Option 101 - TCode
dhcp-option=101,"Pacific/Auckland"
set groups default-dhcp-attributes routing-instances <*> access address-assignment pool <*> family inet dhcp-attributes option 100 string NZST-12NZDT,M9.5.0/2,M4.1.0/3
set groups default-dhcp-attributes routing-instances <*> access address-assignment pool <*> family inet dhcp-attributes option 101 string Pacific/Auckland
option PCode code 100 = text;
option TCode code 101 = text;
option PCode "NZST-12NZDT,M9.5.0/2,M4.1.0/3";
option TCode "Pacific/Auckland";
/ip dhcp-server option add code=100 name=pcode value="'EST5EDT'"
/ip dhcp-server option add code=101 name=tcode value="'America/New_York'"
/ip dhcp-server network set 0 dhcp-option="pcode,tcode"
- Wiki Home
- About the Project
- Getting Started
-
Supported Cameras
- Cameras
- 360 AP1PA3
- AliExpress LTIA‐37FJZ (Vanhua Z55 module)
- AOQEE C1
- Aosu C5L
- Cinnado
- Dekco DC5L
- Eufy
- Galayou/Wansview
- Hualai (Wyze/Atom/Neos/Personal)
- iFlytek XFP301‐M
- Jienuo JN-107-AR-E-WIFI
- Jooan A6M
- LaView L2
- LongPlus X07
- LSC 3215672
- Sannce I21AG
- Sonoff Cam‐S2
- TP-Link Tapo C100/C110/C111
- Wuuk Y0510
- Xiaomi
- Configuration
- Integration
- Development