Skip to main content

Module plugins

Module plugins 

Source
Expand description

World clock plugin — generate time reports for multiple timezones.

Ported from files.md (server/plugins/world_clock.go) by Artem Zakirullin.

Structs§

TimezoneEntry
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.