docs: document all undocumented functions, add built-in timezone table to README
- Added doc comments (/* ... */) to all 14 undocumented static functions in zynk.c matching the existing documentation style (function name, description, Parameters, Returns sections): * DB ops: seen_update, seen_lookup, tell_add, tell_deliver * String utils: valid_irc_word, normalize_city, collapse_spaces * Command handlers: cmd_reload, cmd_time, cmd_seen, cmd_tell, cmd_greeting_or_chat * Timezone helpers: tz_lookup, tz_format - Added complete reference table of all 45 built-in timezones to README.md with region, UTC offset, and DST support status, so users know which timezones work without tzdata installed. - Updated CHANGELOG.md v0.35.5 entry to reflect these additions. - Clean build, zero warnings.
This commit is contained in:
parent
12e9e51967
commit
18dfa64acc
3 changed files with 264 additions and 1 deletions
47
README.md
47
README.md
|
|
@ -126,7 +126,52 @@ Shows the current date and time. Without arguments, displays the bot's local tim
|
|||
| `!time Asia/Tokyo` | Japan time |
|
||||
| `!time Australia/Sydney` | Australian Eastern time |
|
||||
|
||||
Any timezone name from the IANA/Olson timezone database works. Common examples: `UTC`, `US/Eastern`, `US/Central`, `US/Pacific`, `Europe/Berlin`, `Europe/London`, `Europe/Paris`, `Asia/Tokyo`, `Asia/Shanghai`, `Asia/Kolkata`, `Australia/Sydney`, `Pacific/Auckland`.
|
||||
If the system has `tzdata` installed, any IANA/Olson timezone name works. Otherwise, the bot falls back to a built-in table with the following timezones:
|
||||
|
||||
**Built-in timezones (no tzdata required):**
|
||||
|
||||
| Timezone | Region | Offset | DST |
|
||||
|---|---|---|---|
|
||||
| `UTC` / `GMT` | Global | +0 | No |
|
||||
| `EST` / `CST` / `MST` / `PST` / `HST` | US (fixed) | -5 to -10 | No |
|
||||
| `US/Eastern` | US Eastern | -5 / -4 | Yes |
|
||||
| `US/Central` | US Central | -6 / -5 | Yes |
|
||||
| `US/Mountain` | US Mountain | -7 / -6 | Yes |
|
||||
| `US/Pacific` | US Pacific | -8 / -7 | Yes |
|
||||
| `US/Alaska` | US Alaska | -9 / -8 | Yes |
|
||||
| `US/Honolulu` | US Hawaii | -10 | No |
|
||||
| `Canada/Toronto` | Canada Eastern | -5 / -4 | Yes |
|
||||
| `Canada/Vancouver` | Canada Pacific | -8 / -7 | Yes |
|
||||
| `America/Sao_Paulo` | Brazil | -3 / -2 | Yes |
|
||||
| `America/Mexico_City` | Mexico | -6 / -5 | Yes |
|
||||
| `America/Argentina/Buenos_Aires` | Argentina | -3 | No |
|
||||
| `Europe/London` | UK | 0 / +1 | Yes |
|
||||
| `Europe/Berlin` | Central Europe | +1 / +2 | Yes |
|
||||
| `Europe/Paris` | France | +1 / +2 | Yes |
|
||||
| `Europe/Moscow` | Russia | +3 | No |
|
||||
| `Europe/Istanbul` | Turkey | +3 | No |
|
||||
| `Asia/Tokyo` | Japan | +9 | No |
|
||||
| `Asia/Shanghai` | China | +8 | No |
|
||||
| `Asia/Kolkata` | India | +5:30 | No |
|
||||
| `Asia/Dubai` | UAE | +4 | No |
|
||||
| `Asia/Singapore` | Singapore | +8 | No |
|
||||
| `Asia/Seoul` | South Korea | +9 | No |
|
||||
| `Asia/Hong_Kong` | Hong Kong | +8 | No |
|
||||
| `Asia/Taipei` | Taiwan | +8 | No |
|
||||
| `Australia/Sydney` | Australia Eastern | +10 / +11 | Yes |
|
||||
| `Australia/Melbourne` | Australia Eastern | +10 / +11 | Yes |
|
||||
| `Australia/Brisbane` | Australia Eastern | +10 | No |
|
||||
| `Australia/Perth` | Australia Western | +8 | No |
|
||||
| `Australia/Adelaide` | Australia Central | +9:30 / +10:30 | Yes |
|
||||
| `Australia/Darwin` | Australia Central | +9:30 | No |
|
||||
| `Pacific/Auckland` | New Zealand | +12 / +13 | Yes |
|
||||
| `Pacific/Honolulu` | Hawaii | -10 | No |
|
||||
| `Pacific/Fiji` | Fiji | +12 / +13 | Yes |
|
||||
| `Africa/Cairo` | Egypt | +2 | No |
|
||||
| `Africa/Johannesburg` | South Africa | +2 | No |
|
||||
| `Africa/Lagos` | West Africa | +1 | No |
|
||||
| `Africa/Nairobi` | East Africa | +3 | No |
|
||||
| `Atlantic/Reykjavik` | Iceland | +0 | No |
|
||||
|
||||
#### Calculator (`!calc`)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue