2
0
Fork 0
forked from zynk/zynk

fix !time: fall back to built-in timezone table when system lacks tzdata

This commit is contained in:
Johannes Findeisen 2026-07-20 03:56:25 +02:00
commit 12e9e51967
2 changed files with 166 additions and 14 deletions

View file

@ -1,3 +1,8 @@
2026.07.20 – Fix !time to work without tzdata.
- Rewrote `!time` to try the system `localtime_r()` first, then fall back to a built-in timezone table with 45 IANA zones and simplified DST rules when the system can't resolve timezones (e.g. no `tzdata` installed). This means `!time Australia/Sydney` now shows correct AEST/AEDT even on minimal systems.
- Version bumped to 0.35.5.
2026.07.20 – Add pi() to !calc.
- Added `pi()` function support to `!calc`: bc -l does not define `pi()` on all systems, so `cmd_calc` now prepends a `pi()` definition before evaluating expressions. `!calc pi()`, `!calc pi()*2`, `!calc pi()^2` etc. all work.