Expand description
World clock plugin — generate time reports for multiple timezones.
Ported from files.md (server/plugins/world_clock.go) by Artem Zakirullin.
Structs§
- Timezone
Entry - A timezone entry in the world clock report.
Functions§
- can_
handle - Check if the message can be handled by this plugin.
- default_
timezone_ names - Default timezone names (in order).
- format_
report - Format the world clock report as a string.
- handle
- Handle a message: try date, time, and timestamp parsing.
- parse_
and_ show_ date - Try to parse a message as a date (DD.MM.YYYY) and show it in all timezones. Returns None if the message is not a valid date.
- parse_
and_ show_ time - Try to parse a message as a datetime (DD.MM.YYYY HH:MM:SS) and show it in all timezones. Returns None if the message is not a valid datetime.
- parse_
and_ show_ timestamp - Try to parse a message as a Unix timestamp and show it in all timezones. Handles seconds (10 digits), milliseconds (13 digits), and microseconds (16 digits). Returns None if the message is not a valid timestamp.
- world_
clock_ for_ names - Generate world clock report for given timezone names.
- world_
clock_ now - Generate world clock report for the current moment.