Datetimes with Timezones in Python

First, let’s show how the commonly-used plain gets the local time but does not have a timezone: >>> import datetime >>> now = >>> type(now) <class ‘datetime.datetime’> >>> now datetime.datetime(2024, 2, 17, 12, 47, 40, 34210) >>> print(now) 2024-02-17 12:47:40.034210 >>> now.tzinfo is None True >>> Let’s add timezone to it, using the […]

DHCPv6 Relay

Following my earlier post about introduction to DHCPv6, let’s see how DHCPv6 relaying works in practice. In VLAN 60 there is the DHCPv6 client but no DHCPv6 server. The subnet-attached router is configured as DHCPv6 relay, using the DHCPv6 server address from VLAN 41. The components in this setup are: I’ll capture the traffic on […]

Configuring Hourly Log Rotation with Logrotate and Rsyslog

Logrotate runs daily by default on Debian Linux. It is scheduled to run at 00:00:00 with systemd: markku@logtest:~$ systemctl list-timers NEXT LEFT LAST PASSED UNIT ACTIVATES Mon 2023-11-20 00:00:00 EET 2h 20min left Sun 2023-11-19 00:00:17 EET 21h ago logrotate.timer logrotate.service … When you want logrotate to rotate files hourly, you need two changes: For […]